September 2013
Intermediate to advanced
350 pages
9h 38m
English
Sometimes statements get pretty intricate. The recommended Python style is to limit lines to 80 characters, including spaces, tabs, and other whitespace characters, and that’s a common limit throughout the programming world. Here’s what to do when lines get too long or when you want to split it up for clarity.
In order to split up a statement into more than one line, you need to do one of two things:
Note that the line-continuation character is a backslash (\), not the division symbol (/).
Here are examples of both:
| | >>> (2 + |
| | ... 3) |
| | 5 |
| | >>> 2 + ... |
Read now
Unlock full access