Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Python (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Indentation=== {{Main|Python syntax and semantics#Indentation}} Python uses [[whitespace character|whitespace]] indentation, rather than curly brackets or keywords, to delimit [[block (programming)|blocks]]. An increase in indentation comes after certain statements; a decrease in indentation signifies the end of the current block.<ref name="AutoNT-53"/> Thus, the program's visual structure accurately represents its semantic structure.<ref name=guttag>{{Cite book |publisher=MIT Press |isbn=978-0-262-52962-4 |last=Guttag |first=John V. |title=Introduction to Computation and Programming Using Python: With Application to Understanding Data |date=12 August 2016}}</ref> This feature is sometimes termed the [[off-side rule]]. Some other languages use indentation this way; but in most, indentation has no semantic meaning. The recommended indent size is four spaces.<ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0008/|title=PEP 8 β Style Guide for Python Code|website=Python.org|access-date=26 March 2019|archive-date=17 April 2019|archive-url=https://web.archive.org/web/20190417223549/https://www.python.org/dev/peps/pep-0008/|url-status=live}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)