Friday, February 4, 2011

Feb 4

Alright continuing onto using triple quotes, I learned that you can span the lines to where text appears on the next line, like so:
message = "This line will
...span several
....lines."""
And when you tell python to print message you get:
This line will
span several
lines.
This is because you can add as much words you want to this script. Then it will only give you the prompt of >>> when you finally add the last """ to the end of your lines.
#1:

1 comment:

  1. Cool! I commented on this on your previous post, but I can see you figured it out for yourself.

    ReplyDelete