Use of comments in Python

--Originally published at Ed_Alita

The reason to put comments in a Phyton program is in oder to know what does a funtion does. For example let’s say that you pass your code to a friend whitout any comment so he only stare at the code. He probrably can deduce what a funtion does but he doesn’t know all what you are doing in the code.

Know that I explain why comments are so important lets talk about how this comments work. In Python there are two types of comments the first ones are called the single line comment. This comment works by this way, you need first to put “#” and after it put your comment. (Remember to close it by putting “#” at the last of your comment. The comments don’t interrumpt the flow of the program.

This is the example of this:

Phyton3

The other comments are mutiline string those ones can take planes in many lines those ones are useful when you need to describe more than a funtion.

This is the example of this:

python4

#TC101 #Python

The material use in this blog  can be read at http://www.pythonforbeginners.com/comments/comments-in-python