Comments
In programming, comments are the parts of code that Python ignores. The primary purpose of using them is readability. It is good practice to leave comments in your code with descriptions of what a particular part of that code does.
In Python, the comment starts with the hash #
sign. All the text to the right of the #
will be ignored. For example, you may have two print()
functions, but if you place #
to the left of one of them, then only one text will be outputted.
12print('String 1') #print('String 2')
Merci pour vos commentaires !
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Posez-moi des questions sur ce sujet
Résumer ce chapitre
Afficher des exemples du monde réel
Awesome!
Completion rate improved to 4
Comments
Glissez pour afficher le menu
In programming, comments are the parts of code that Python ignores. The primary purpose of using them is readability. It is good practice to leave comments in your code with descriptions of what a particular part of that code does.
In Python, the comment starts with the hash #
sign. All the text to the right of the #
will be ignored. For example, you may have two print()
functions, but if you place #
to the left of one of them, then only one text will be outputted.
12print('String 1') #print('String 2')
Merci pour vos commentaires !