Which of the following is a valid way to comment out multiple lines in Python?
Correct answer
C. # ... #
14 views
C. # ... #
14 views
Python has no dedicated multi-line comment syntax, so the valid approach is to start each line with #.
Triple-quoted strings ("""...""") are often used as block comments, but they are really string literals (docstrings). /* */, // and <!-- --> are comment styles of C, JavaScript and HTML.
Keep preparing with more Computer Science MCQs on MCQsExam.com.
Not sure why the answer is C? Ask here and get an explanation.