Python Comments Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report Comments in Python are the lines in the code that are ignored by the interpreter during the execution of the program. Comments enhance the readability of the code.Comment can be used to identify functionality or structure the code-base.Comment can help understanding unusual or tricky scenarios handled by the code to prevent accidental removal or changes. Comments can be used to prevent executing any specific part of your code, while making changes or testing. python # I am single line comment """ Multi-line comment used print("Python Comments") """ Comments in PythonIn Python, single line comments starts with hashtag symbol #. Python # sample comment name = "geeksforgeeks" print(name) Outputgeeksforgeeks Multi-Line CommentsPython does not provide the option for multiline comments. However, there are different ways through which we can write multiline comments.Multiline comments using multiple hashtags (#)We can multiple hashtags (#) to write multiline comments in Python. Each and every line will be considered as a single-line comment. Python # Python program to demonstrate # multiline comments print("Multiline comments") Also Check: Interesting Fact about Python Multi-line CommentsUsing String Literals as CommentPython ignores the string literals that are not assigned to a variable. So, we can use these string literals as Python Comments. Python 'Single-line comments using string literals' """ Python program to demonstrate multiline comments""" print("Multiline comments") Best Practice to Write CommentsThese are some of the tips you can follow, to make your comments effective are:Comments should be short and precise.Use comments only when necessary, don't clutter your code with comments.Avoid writing generic or basic comments.Write comments that are self explanatory. Comments in Python Visit Course Comment More infoAdvertise with us Next Article Multiline Comments in Python B bkpraveenkumarads Follow Improve Article Tags : Python python-utility python-basics python Practice Tags : pythonpython Similar Reads Multiline Comments in Python A multiline comment in Python is a comment that spans multiple lines, used to provide detailed explanations, disable large sections of code, or improve code readability. Python does not have a dedicated syntax for multiline comments, but developers typically use one of the following approaches:It he 4 min read Python Modules Python Module is a file that contains built-in functions, classes,its and variables. There are many Python modules, each with its specific work.In this article, we will cover all about Python modules, such as How to create our own simple module, Import Python modules, From statements in Python, we c 7 min read Python Features Python is a dynamic, high-level, free open source, and interpreted programming language. It supports object-oriented programming as well as procedural-oriented programming. In Python, we don't need to declare the type of variable because it is a dynamically typed language. For example, x = 10 Here, 5 min read Python Crash Course If you are aware of programming languages and ready to unlock the power of Python, enter the world of programming with this free Python crash course. This crash course on Python is designed for beginners to master Python's fundamentals in record time! Experienced Python developers developed this fre 7 min read How to write Comments in Python3? Comments are text notes added to the program to provide explanatory information about the source code. They are used in a programming language to document the program and remind programmers of what tricky things they just did with the code and also help the later generation for understanding and mai 4 min read Python vs Cpython Python is a high-level, interpreted programming language favored for its readability and versatility. It's widely used in web development, data science, machine learning, scripting, and more. However, Cpython is the default and most widely used implementation of the Python language. It's written in 4 min read Like