Coding in Python 10 – Comments and Style

In video number 10 of the Coding in Python series, we take a look at various forms of comments, and some guidelines regarding style.

YouTube player

Commands Used in this Video



# This is a comment.

print("This is NOT a comment.")

In-line comment


myvar = 3  # This is a variable


Multi-line comment


# This is
# a
# multi-line
# comment

Documentation String

""" This program is intended to do something really neat.
This is version 1.0.
This program may be useful, some day.

print("This is a string.")

Commenting out a String


print("This program will fail.")

#my var1 = 3
myvar2 = 2
myvar1 = 5


Brand-New Course!

Check out Jay’s new course on Ansible and start automating today!

Discount Vouchers

Receive 5% off an LPI exam voucher!

Exclusive Member Features

Support the channel and receive exclusive perks!