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,
- Python: Convert Date to DateTime
- How to sort a List using Lambda in Python
- Python matplotlib segmentation fault: 11 macOS Big Sur
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- How to install Python 3.11 on Mac
- How to flatten a nested list in Python
- Python: Pandas Merge DataFrames on Index Example
- How to Run all Cells at Once Jupyter Notebook
- Python - Convert float to String
- How to add borders to tkinter label text
- How to Exit a Loop in Python Code
- [Python] Fix: ValueError: All arrays must be of the same length
- Sorting an array using Bubble Sort in Python Programming
- How to Unzip a file using Python
- Python: Merge DataFrames Pandas Outer Join Example
- Change label (text) color in tkinter
- Convert Float to String in Python
- Fix: fatal error: No such file or directory compilation terminated
- Python: Access index/counter of a for loop iteration
- Import Other Python Files Examples
- How to install Anaconda on Mac (M1/M2 Mac)
- Python Regular Expression to Find All Matches in List
- How to Read a binary File with Python
- How to disable warnings while Python file execution
- Know current Python Version
More Posts:
- Install Native Java JDK JRE on Apple Silicon M1 Mac - MacOS
- How to Change name on Microsoft Teams Application - Teams
- [Tutorial] How to Customize Notepad++ Toolbar - NotepadPlusPlus
- [fix] Loading class com.mysql.jdbc.Driver is deprecated - MySQL
- Fix: error: invalid command bdist_wheel - Python - Python
- How to Set Background Wallpaper on macOS 13 Ventura - MacOS
- Android Studio 1.3 beta now Available for Developers - Android-Studio
- java: cannot infer type for local variable, cannot use var on variable without initializer - Java