(Marathi) Python Part 6 - Comments in Python - practical

Опубликовано: 17 Февраль 2019
на канале: Python Vython
166
6

#THEM
#Them
#them
In this video we are going to talk about comments in python programming language
How to use comments in Python
When working with any programming language, you include comments in the code to notate your work. This details what certain parts of the code are for, and lets other developers – you included – know what you were up to when you wrote the code. This is a necessary practice, and good developers make heavy use of the comment system. Without it, things can get real confusing, real fast.



How to Write Comments in Python
In Python, there are two ways to annotate your code.

The first is to include comments that detail or indicate what a section of code – or snippet – does.

The second makes use of multi-line comments or paragraphs that serve as documentation for others reading your code.

Think of the first type as a comment for yourself, and the second as a comment for others. There is not right or wrong way to add a comment, however. You can do whatever feels comfortable.



Single-line comments are created simply by beginning a line with the hash (#) character, and they are automatically terminated by the end of line.

For example:



#This would be a comment in Python


Смотрите видео (Marathi) Python Part 6 - Comments in Python - practical онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Python Vython 17 Февраль 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 166 раз и оно понравилось 6 людям.