Using quotation marks inside quotation marks
You need to escape it. (Using Python 3 print function):
>>> print("The boy said \"Hello!\" to the girl")
The boy said "Hello!" to the girl
>>> print('Her name\'s Jenny.')
Her name's Jenny.
See the python page for string literals.
You could do this in one of three ways:
Use single and double quotes together:
print('"A word that needs quotation marks"') "A word that needs quotation marks"
Escape the double quotes within the string:
print("\"A word that needs quotation marks\"") "A word that needs quotation marks"
Use triple-quoted strings:
print(""" "A word that needs quotation marks" """) "A word that needs quotation marks"
Python accepts both " and ' as quote marks, so you could do this as:
>>> print '"A word that needs quotation marks"'
"A word that needs quotation marks"
Alternatively, just escape the inner "s
>>> print "\"A word that needs quotation marks\""
"A word that needs quotation marks"