Vidyalelo
Python · Q13

Python Introduction and basic

Programming · Python · question 13

Q13

Which of the following character is used to give single-line comments in Python?

A.
//
B.
#
Answer
C.
!
D.
/*

Answer: Option B

Solution

Answer: Option B
Solution:
In Python, the character used to give single-line comments is #.
Any text that comes after the # symbol on a line is treated as a comment and is ignored by the Python interpreter during execution. Single-line comments are commonly used for adding explanations, notes, or reminders within the code to improve readability and understanding.