Comments in Python

In Python, comments are annotations in the source code that the interpreter ignores during execution.

For Example:

print("I like him")
# him = my little brother

Line 2 is a comment it starts with a # and won't be displayed in the output because the interpreter ignores it

The output of the code above would be:

I like him

Next

Challenge (optional)

Create a program that has a comment of 1 thing you like and on line 2 print out that comment!

r


⏳ Loading...