Python MCQs with Explanation

Which character is used in Python to make a single line comment?

  1. //
  2. #
  3. /* comment */
  4. """ Comment """



Answer: 
Option b: #

In Python, the # character is used to indicate a single-line comment. Any text or code that follows the # character on the same line is considered a comment and is ignored by the Python interpreter when executing the code.

Post a Comment

0 Comments