Message235414
In the tutorial for 2.7.9, in the section on quotes and the escape character, there is the following example text:
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'
>>> print '"Isn\'t," she said.'
"Isn't," she said.
>>> s = 'First line.\nSecond line.' # \n means newline
>>> s # without print(), \n is included in the output
'First line.\nSecond line.'
>>> print s # with print, \n produces a new line
First line.
Second line.
Note the print() in a comment. Isn't that Python 3 syntax? Should just be print for 2.7, I believe. |
|
Date |
User |
Action |
Args |
2015-02-05 01:12:24 | johnboersma | set | recipients:
+ johnboersma, docs@python |
2015-02-05 01:12:24 | johnboersma | set | messageid: <1423098744.16.0.128886256638.issue23396@psf.upfronthosting.co.za> |
2015-02-05 01:12:24 | johnboersma | link | issue23396 messages |
2015-02-05 01:12:23 | johnboersma | create | |
|