in any columnindentation may consist of any number of spaces and tabsas long as it' the same for all the statements in given single block that ispython doesn' care how you indent your codeit only cares that it' done consistently four spaces or one tab per indentation level are common conventionsbut there is no absolute standard in the python world indenting code is quite natural in practice for examplethe following (arguably sillycode snippet demonstrates common indentation errors in python codex 'spamif 'rubberyin 'shrubbery'print( +'niif endswith('ni') * print(xerrorfirst line indented errorunexpected indentation errorinconsistent indentation the properly indented version of this code looks like the following--even for an artificial example like thisproper indentation makes the code' intent much more apparentx 'spamif 'rubberyin 'shrubbery'print( +'niif endswith('ni') * print(xprints "spamprints "spamnispamniit' important to know that the only major place in python where whitespace matters is where it' used to the left of your codefor indentationin most other contextsspace can be coded or not howeverindentation is really part of python syntaxnot just stylistic suggestionall the statements within any given single block must be indented to the same levelor python reports syntax error this is intentional--because you don' need to explicitly mark the start and end of nested block of codesome of the syntactic clutter found in other languages is unnecessary in python as described in making indentation part of the syntax model also enforces consistencya crucial component of readability in structured programming languages like python python' syntax is sometimes described as "what you see is what you get--the indentation of each line of code unambiguously tells readers what it is associated with this uniform and consistent appearance makes python code easier to maintain and reuse indentation is simpler in practice than its details might initially implyand it makes your code reflect its logical structure consistently indented code always satisfies python' rules moreovermost text editors (including idlemake it easy to follow python' indentation model by automatically indenting code as you type it python syntax revisited