Robotics & Artificial Intelligence

Which of the following character is used to give a single line comment in Python?

  1. \/\/
  2. #
  3. !
  4. /*

Getting Started

3 Likes

Answer

#

Reason — In Python, the hash symbol (#) is used to write a single-line comment, which is ignored by the Python interpreter during program execution.

Answered By

1 Like


Related Questions