one rule of thumbalthough you can use spaces or tabs to indentit' usually not good idea to mix the two within block--use one or the other technicallytabs count for enough spaces to move the current column number up to multiple of and your code will work if you mix tabs and spaces consistently howeversuch code can be difficult to change worsemixing tabs and spaces makes your code difficult to read completely apart from python' syntax rules--tabs may look very different in the next programmer' editor than they do in yours in factpython issues an errorfor these very reasonswhen script mixes tabs and spaces for indentation inconsistently within block (that isin way that makes it dependent on tab' equivalent in spacespython allows such scripts to runbut it has - command-line flag that will warn you about inconsistent tab usage and -tt flag that will issue errors for such code (you can use these switches in command line like python - main py in system shell windowpython ' error case is equivalent to ' -tt switch statement delimiterslines and continuations statement in python normally ends at the end of the line on which it appears when statement is too long to fit on single linethougha few special rules may be used to make it span multiple linesstatements may span multiple lines if you're continuing an open syntactic pair python lets you continue typing statement on the next line if you're coding something enclosed in (){}or [pair for instanceexpressions in parentheses and dictionary and list literals can span any number of linesyour statement doesn' end until the python interpreter reaches the line on which you type the closing part of the pair ( )}or ]continuation lines--lines and beyond of the statement --can start at any indentation level you likebut you should try to make them align vertically for readability if possible this open pairs rule also covers set and dictionary comprehensions in python and statements may span multiple lines if they end in backslash this is somewhat outdated feature that' not generally recommendedbut if statement needs to span multiple linesyou can also add backslash ( not embedded in string literal or commentat the end of the prior line to indicate you're continuing on the next line because you can also continue by adding parentheses around most constructsbackslashes are rarely used today this approach is also error-proneaccidentally forgetting usually generates syntax error and might even cause the next line to be silently mistaken ( without warningfor new statementwith unexpected results special rules for string literals as we learned in triple-quoted string blocks are designed to span multiple lines normally we also learned in that adjacent string literals are implicitly concatenatedwhen it' used in if tests and syntax rules