On Sun, Jan 24, 2016 at 12:45 AM, Steven D'Aprano <st...@pearwood.info> wrote:
> On Sun, 24 Jan 2016 12:19 am, Chris Angelico wrote:
>
>> On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano <st...@pearwood.info>
>> wrote:
>>> On Sat, 23 Jan 2016 09:02 pm, rai...@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@ando ~]$ python -c "for i in range(5):
>>     print 'hello world'
>> "
> hello world
> hello world
> hello world
> hello world
> hello world
> [steve@ando ~]$

Well, not everyone's shells are as awesome as bash... and not everyone
knows you can do that. That said, though... this is a good reason for
giving full context for the question. "I'm trying to X, but I get this
error because of Y. How would I go about fixing Y?" - response:
"Actually, you can do X in a slightly different way.".

Just sayin', there might be other reasons for wanting to put things
onto one line.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to