Practice mode Python

Which character begins a single-line comment in Python?

Correct answer B. #

Explanation

In Python a comment starts with a hash character # that is not inside a string literal and runs to the end of the physical line. // is the floor division operator in Python, while -- and /* are comment markers in languages such as SQL and C. Python has no dedicated multi-line comment syntax.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.