Vidyalelo
Python · Q27

Python MCQs: Variable Names and Operators Chapter

Programming · Python · question 27

Q27

Which of the following is a valid way to comment a single line in Python?

A.
\ comment
B.
/ comment
C.
<!-- comment -->
D.
# comment
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
The # symbol is used to comment a single line in Python.