Multiline code - trailing slash usage

abcd codecraig at gmail.com
Thu Mar 15 15:57:12 CET 2007


When do I need to use a trailing slash to separate code over multiple
lines.

For example:

x = "hello world, this is my multiline " + \
     "string!!!!"

x = {'name' : \
      'bob'}

Do I need to use the "\" in the above examples?  When do i need to use
it?




More information about the Python-list mailing list