![]() |
VOOZH | about |
Comments in Python are used to add explanatory notes to code and are ignored during program execution.
Single line comments starts with hashtag symbol #.
geeksforgeeks
Python does not have a dedicated syntax for multi-line comments. However, they are commonly written using multiple # symbols or unassigned string literals.
We can use multiple hashtags (#) to write multiline comments. Each and every line will be considered as a single-line comment.
Python ignores the string literals that are not assigned to a variable. So, we can use these string literals as comments.