Kent Johnson wrote: > 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 >
You're right. I though he was looking to embed the newline, but I read it wrong. > > Kent > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor