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,
- Comments in Python Programming
- tkinter - Hello World! Program
- How to install Python 3.11 on Mac
- Python matplotlib segmentation fault: 11 macOS Big Sur
- Change label (text) color in tkinter
- Python Hello World! Program with code example (snippet)
- Calculate discount amount python code
- Take input argument from command line in Python Programming
- How to pip install Python Modules in VSCode
- Tkinter - add x and y padding to label text
- Python raise error with message example
- Check if String Contains a Substring - Python
- Python Program To Calculate Simple Interest (SimpleInterest.py)
- What does b prefix before a String mean in Python?
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- How to List all Packages installed using pip [Python]
- Convert Float to String in Python
- Change the background of Tkinter label or text
- How to Install Python Modules in VS Code
- Indent Python code in Notepad++
- Validate email address in Python using regular expression (regex)
- Python: Fix command not found pip or pip3 on zsh shell
- TypeError: must be str, not int [Fix Python]
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- Python - Convert float to String
More Posts:
- Changed AD user display name showing old name in SharePoint - SharePoint
- How to detect Operating System using Java code - Java
- Eclipse : The type java.lang.CharSequence cannot be resolved. Indirectly referenced from required .class files - Java
- SharePoint Designer 2010 - errors were found when compiling the workflow - SharePoint
- [Fatal Error] XML The markup in the document following the root element must be well-formed. - Java
- How to set background color for android layout pragmatically using java and through xml - Android
- Fix- Microsoft Word Pages Appear Black - Microsoft
- How to display Line Number in Eclipse IDE - Eclipse