Comments and Error messages in Python.


Comments in python:

Comments are used to explain code. By using comments we can make code more readable and it can be used to prevent execution when testing code.

Writing comments in Python:

comment in python starts with  # and python interpreter will ignore code written after #.

For eg.


Multiline comments in Python:

Python will ignore string literals that are not assigned to variables .you can add a multiline string.

For eg.


Error messages in Python:





Post a Comment

0 Comments