Comment là text giải thích trong source code, bị compiler/interpreter bỏ qua.
Python dùng # bắt đầu comment line. Hiệu lực đến hết dòng. Nếu # là ký tự đầu dòng, cả dòng là comment. Dùng giữa dòng: text trước là expression hợp lệ, sau là comment.
#this is a comment
print("Hello World")
print("Welcome to TutorialsPoint") #this is also a comment but after a statement.
Python không có multi-line comment/block comment. Mỗi dòng phải có # đầu. Nhiều IDE có shortcut comment block. Triple-quoted string cũng là comment nếu không phải docstring.
'''
comment1
comment2
comment3
'''
print("Hello World")