- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do we create multiline comments in Python?
Comment is a piece of text in a computer program that is meant to be a programmer-readable explanation or annotation in the source code and not ignored by compiler/interpreter. In Python script, the symbol # indicates start of comment line.
C like block comment (/* .. */) is not available in Python. If more than one consecutive line are to be commented, # symbol must be put at beginning of each line
##comment1 ##comment2 ##comment3 print ("Hello World")
A triple quoted multi-line string is also treated as comment if it is not a docstring of a function or class.
''' comment1 comment2 comment3 ''' print ("Hello World")
- How do we provide comments in Python?
- How do we create python string from list?
- How to create a multiline entry with Tkinter?
- How can we write a multiline lambda expression in Java?
- How to create hidden comments in HTML?
- How to create conditional comments in HTML?
- How do we create a structure in C#?
- How do we create underlined text in HTML?
- How do we create preformatted text in HTML?
- Comments in Python
- How do we create a sub window in HTML?
- How do we create an image map in HTML?
- How do we compare Python Dates?