cathysia@mancinism:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> print “What’s your name?”
What’s your name?
>>> print ‘What\’s your name’
What’s your name
>>> print “\\”What’s your name\\” I asked.”
File “<stdin>”, line 1
print “\\”What’s your name\\” I asked.”
^
SyntaxError: invalid syntax
>>> print ‘What\”s your name’
What”s your name
>>> print ‘This is the first line
File “<stdin>”, line 1
print ‘This is the first line
^
SyntaxError: EOL while scanning string literal
>>> print ‘This is the first line\nThis is the second line’
This is the first line
This is the second line
>>> Print ‘This is the first line. \
… This is the second line.’
File “<stdin>”, line 2
This is the second line.’
^
SyntaxError: invalid syntax
>>> Print ‘This is the first line. \ This is the second line.’
File “<stdin>”, line 1
Print ‘This is the first line. \ This is the second line.’
^
SyntaxError: invalid syntax
>>> print “THis is the first line. \ This is the second line.”
THis is the first line. \ This is the second line.
>>> print “This is the first line.\This is the second line.”
This is the first line.\This is the second line.
>>> r”Newlines are indicated by \n”
‘Newlines are indicated by \\n’
>>> print r”Newlines are indicated by\n”
Newlines are indicated by\n
>>>