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


Groups > comp.lang.python > #63176

Re: print range in python3.3

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: print range in python3.3
Date 2014-01-05 08:03 +0000
References <52C90BE5.3010909@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4934.1388908990.18130.python-list@python.org> (permalink)

Show all headers | View raw


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 :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

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


Thread

Re: print range in python3.3 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-05 08:03 +0000

csiph-web