import locale and print range on same line

Steven D'Aprano steve at pearwood.info
Sat Jan 23 08:45:28 EST 2016


On Sun, 24 Jan 2016 12:19 am, Chris Angelico wrote:

> On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano <steve at pearwood.info>
> wrote:
>> On Sat, 23 Jan 2016 09:02 pm, raiwil at gmail.com wrote:
>>
>>> However I need to put the code on one single line.
>>
>> Why? Is the Enter key on your keyboard broken?
> 
> Maybe it's for a python -c invocation.


[steve at ando ~]$ python -c "for i in range(5):
>     print 'hello world'
> "
hello world
hello world
hello world
hello world
hello world
[steve at ando ~]$




-- 
Steven




More information about the Python-list mailing list