Python Comments

Python Comments are used to provide extra details about various aspects of a program. They are usually included at the start of a program to indicate its purpose, its author, and the date on which it was written. They also provide clarification about complicated statements in the program.

Python Single-line Comments

The # (hash) is used in Python for single-line comments.

Python Multi-line Comments

The # (hash) can be used in Python for multiline comments. The triple-quoted strings can also be used for multiline comments.

Example

In this example, single and multi-line comments are covered in Python:

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

Python Tokens
Python break and continue statements
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading