In Python, you can add multiple lines as comments in two ways:
- By using the “#” symbol at the beginning of each line of the comment, or
- By using string literals in single (‘), double (“), or triple (“””) quotation marks.
Example:
# This is a good example
# of how you can arrange comments
# over multiple lines in Python
"
    This is a good example
    of how you can arrange comments
    over multiple lines in Python
"
 Both the above examples show comments in multiple lines.
Related Questions
- What is the use of Del in Python?
- How do you define a function in Python?
- How do you declare a global variable in python?
- How do you find the range in Python?
- How do you sort a list in Python and Python 3?
- How do I reverse a list in Python?
- What are the different types of comments in Python?
- How do you Del statement in Python?
- What is function in Python with example?
- What is a global variable in python?
- What is __ Getattr __ in Python and what it is used for?
- How do you range a number in Python?
- How do you comment out a paragraph in Python?
- What is __ del __ in Python?
- What is the function of == in Python?
- Is it OK to use global variables in Python?
- What is Getattr and Setattr in Python?
- How does Range () work in Python?
- What does sort () do in Python?
- How do you reverse in Python 3?
- What do you mean by comments in Python?
- How do I delete a command in python?
- How do you declare a global list in Python?
- How do you sort a list in descending in python?
- How do you reverse a list without reverse?
Related Topics
- Python Lambda (Anonymous) Function
- Python *args and **kwargs (With Examples)
- Python Array of Numeric Values
- Python Assert Statement
- Python Comments (With Examples)
- Python del Statement (With Examples)
- Python Dictionary Comprehension
- Python Functions (def): Definition with Examples
- Python Function Arguments (Default, Keyword and Arbitrary)
- Python Global Keyword (With Examples)
- Python Global, Local and Nonlocal variables (With Examples)
- Python ascii()
- Python delattr()
- Python super()
- Python locals()
- Python hash()
- Python id()
- Python sorted()
- Python dict()
- Python callable()
- Python dir()
- Python next()
- Python divmod()
- Python float()
- Python bytearray()
- Python filter()
- Python issubclass()
- Python __import__()
- Python enumerate()
- Python list()
- Python input()
- Python int()
- Python complex()
- Python zip()
- Python iter()
- Python bool()
- Python hex()
- Python open()
- Python ord()
- Python Built-in Functions
- Python oct()
- Python compile()
- Python reversed()
- Python tuple()
- Python frozenset()
- Python map()
- Python setattr()
- Python len()
- Python chr()
- Python object()
- Python bytes()
- Python getattr()
- Python slice()
- Python str()
- Python sum()
- Python isinstance()
- Python bin()
- Python type()
- Python range()
- Python Dictionary items()
- Python List sort()
- Python List reverse()
- Python String strip()
- Python String join()
- Python String split()
- Python User-defined Functions
Leave a Reply