In this article, we will take a look at how we can comment code in Python,
You must be aware there are two ways in which we can comment in Python Programming,
Single Line Comment:file_read_counter = 0 # Keep a track of how many files are read and processed.

Python - Single Line Comment
Multi Line Comment
"""
Program to show how to add multi-line comment
Author: Code2care
Date: 22 March 2022
"""

Python - Multi Line Comment
You can use the same ways of commenting style to comment Python code as well,
Single Line code comment:# num = 20
Multi Line code comment
"""
a = 10
b = 20
sum = a + b
print(sum)
"""
More Posts related to Python,
- How to add two float numbers in Python
- tkinter - Hello World! Program
- Convert Float to String in Python
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- How to List all Packages installed using pip [Python]
- Check if String Contains a Substring - Python
- Change label (text) color in tkinter
- Where does brew install python in macOS
- Validate email address in Python using regular expression (regex)
- How to uninstall pip Python packages
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- Python: Fix command not found pip or pip3 on zsh shell
- Check version of pip package installer for Python
- 3 Python program to add two numbers
- Calculate discount amount python code
- How to add borders to tkinter label text
- How to install Python 3.9 using brew on Mac
- Python Program To Calculate Simple Interest (SimpleInterest.py)
- Comments in Python Programming
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- How to take user input from the console in a Python program
- Install and Run Jupyter Notebook on Mac (macOS)
- Tkinter - add x and y padding to label text
- 7 Python Arithmetic Operators with Examples [Tutorial]
- Python Sleep Function/Method Code Example
More Posts: