How to do a multiline comment in python
Answers
Answered by
0
technically you cant and have to put # on every line but you have a workaround which is to write is as a string:
'''
this is a
multi
line
comment
'''
triple ' or "
'''
this is a
multi
line
comment
'''
triple ' or "
Answered by
2
Answer:
Unlike other programming languages Python doesn't support multi-line comment blocks out of the box. The recommended way to comment out multiple lines of code in Python is to use consecutive # single-line comments. This is the only way to get “true” source code comments that are removed by the Python parser.
Explanation:
Hope it helps you
Similar questions