Skip to content

Instantly share code, notes, and snippets.

@lambdaman2
Created October 1, 2012 12:48
Show Gist options
  • Select an option

  • Save lambdaman2/3811585 to your computer and use it in GitHub Desktop.

Select an option

Save lambdaman2/3811585 to your computer and use it in GitHub Desktop.
Python: String literals that span multiple lines
# Continuation lines can be used, with a backslash as the last character on the
# line indicating that the next line is a logical continuation of the line:
hello = "This is a rather long string containing\n\
several lines of text just as you would do in C.\n\
Note that whitespace at the beginning of the line is\
significant."
print hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment