Comments in Python Code

Q

How to enter comments in Python Code?

✍: FYIcenter.com

A

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!

 

Statement Syntax and Execution Flow Control

⇒⇒Python Tutorials

2017-09-09, 112👍, 0💬