Strings as Comments


# marks single line comments. There are no real multi-line comments in Python, but we can use triple-quots to create multi-line strings and if they are not part of another statement, they will be disregarded by the Python interpreter. Effectively creating multi-line comments.


examples/basics/string_comments.py
print("hello")

'A string which is disregarded'

print(42)

'''
  Using three single-quotes on both ends (a triple-quoted string)
  can be used as a multi-line comment.
'''

print("world")