Python quotes

"""
Generally speaking, single quotes and double quotes are exactly the same.
"""

a = 'I\'m a bad man'
print(a)
b = "I'm a bad man"
print(b)

c = 'I am a "bad man"'
print(c)
d = "I am a \"bad man\""
print(d)

# I'm a bad man
# I'm a bad man
# I am a "bad man"
# I am a "bad man"

你可能感兴趣的:(Python quotes)