Home › Python Tutorial › Python syntax and comments
Python syntax and comments
Indentation is part of the language.
Python uses indentation (usually 4 spaces) to mark blocks of code instead of curly braces. Comments start with #. A triple-quoted string can act as a multi-line comment.
Example code
# Indentation defines the block
if 5 > 2:
print("Five is greater than two")
"""A triple-quoted string
can span many lines"""