Comments in Python Code


How to enter comments in Python Code?



There is only one way to enter comments in Python code. That is to enter them at the end of any code line preceded by the hash character "#".

For example:

# this is the first comment
x = 1  # and this is the second comment
       # and now a third!


'if ... elif ... else' Conditional Statement Blocks

Multi-line Statements in Python Code

Statement Syntax and Execution Flow Control

⇑⇑ Python Tutorials

2017-09-09, 224👍, 0💬