Blog Details

img
Data Science

What is comment function in Python

Spoke Right / 16 Nov, 2023

Python Comments:

Python comments are used to give a brief description about any specific line of code or about a module in the code to make the code more user-friendly.

Python Comments can be of two types:

  • Single line Comments
  • Multi line Comments

Single Line Comments:

Single line comments starts with # in Python.

Multi Line Comments:

Multi line comments are written inside triple quotes.

Example:

# Print a = 10
a = "Single line Comment"
print a
 
"""Print b = 50
multi line
comment """
b = 10
print b

0 comments

Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0