Languages
[Edit]
EN

Python - Comments

0 points
Created by:
Geospatial-Palus
660

In this article, we would like to show you how to use comments in Python.

Quick solution:

# This is a comment

 

Practical example

Comments can be placed both in separate line and at the end of the line. When placed at the end of the line Python will ignore the rest of the line.

# my variable
x = 10

or 

x = 10  # my variable

You can also comment a piece of code:

x = 10
# print(x)
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Python - fundamentals

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join