Created
June 10, 2018 11:19
-
-
Save martin-martin/cf5fac54827b999de0c9e5d7a58a430a to your computer and use it in GitHub Desktop.
about python strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# creating a python string with single quotes | |
job = 'coding' | |
# creating a python string with double quotes | |
location = "nomad" | |
print(job, location) # both of them work fine | |
# however, a mix-up of the two does not work and produces a SyntaxError | |
print("help!') | |
# produces SyntaxError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment