Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63182

Re: print range in python3.3

References <52C90BE5.3010909@gmail.com> <lab3j2$t62$1@ger.gmane.org>
Date 2014-01-05 02:16 -0700
Subject Re: print range in python3.3
From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4938.1388913428.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Jan 5, 2014 1:04 AM, "Mark Lawrence" <breamoreboy@yahoo.co.uk> wrote:
>
> On 05/01/2014 07:38, luofeiyu wrote:
>>>>>
>>>>> range(1,10)
>>
>> range(1, 10)
>>>>>
>>>>> print(range(1,10))
>>
>> range(1, 10)
>>
>> how can i get 1,2,3,4,5,6,7,8,9 in python3.3 ?
>>
>
> for i in range(1,10):
>     print(i, end=',')
> print()
>
> I hope you can cope with the comma at EOL :)

print(*range(1, 10), sep=',')

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: print range in python3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2014-01-05 02:16 -0700

csiph-web