Skip to content

Instantly share code, notes, and snippets.

@j00bar
Last active September 28, 2015 12:47
Show Gist options
  • Save j00bar/45f445dc567caf0d6568 to your computer and use it in GitHub Desktop.
Save j00bar/45f445dc567caf0d6568 to your computer and use it in GitHub Desktop.
"You can use double-quotes, no problem."
'Single ticks work too.'
"You can't use unescaped double-quotes in a double-quote delimited string, but you can use single ticks."
'Jag says, "Same goes in reverse." Also, the cow says, "Moo."'
'And like you saw, if you\'re going to use a tick in a tick-delimited string, escape it.'
("If you're trying to keep your line lengths under 80 and you have a long "
"string you can wrap it in parentheses and Python will concatenate the "
"strings for you. Just don't forget trailing spaces.")
"""You can also use triple quotes or triple ticks for long strings and
simply use line breaks. Triple quoted or triple ticked strings can include
both quotes and ticks inside of them, no problem."""
u"Generally a good idea to use Unicode strings to make sure that your code is properly i18n'ed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment