November 2018
Beginner
304 pages
7h 35m
English
Statements can span more than one line if they are collected within braces (parentheses (), square brackets [], or curly braces {}). Normally parentheses are used. When spanning lines within braces, indentation doesn't matter; the indentation of the initial bracket is used to determine which code section the whole statement belongs to. The following example shows a single variable having to span multiple lines due to the length of the parameters:
tank1 = tank.Tank( "Tank 1", level=36.0, fluid_density=DENSITY, spec_gravity=SPEC_GRAVITY, outlet_diam=16, outlet_slope=0.25 )
tank1 is the variable, and everything to the right of the equal sign is assigned to tank1. While Python allows the developer to write everything ...
Read now
Unlock full access