Eric Brunson wrote:
> claxo wrote:
>> dont indent the line after '\', that means 0 indent
>>
>> s = 'hello\
>> boy'
>>   
> 
> Or, arguably better:
> 
> s = '''hello
> boy'''

That is a different string, it contains a newline, the original does not:

In [20]: s = 'hello\
    ....: boy'
In [21]: s2 = '''hello
    ....: boy'''
In [22]: s==s2
Out[22]: False
In [23]: print s
helloboy
In [24]: print s2
hello
boy


Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to