+ 1
How to use comments
About comments
3 Answers
+ 4
technically comments are handled differently in the various programming languages. but the way which content is put in a comment and how we phrase it should be the same in all languages.
please use google for more details and recommendations.
in the pep 8 from python you can find some helpful hints:
https://peps.python.org/pep-0008/#comments
+ 3
Please tag the relevant language
+ 2
Use comments to write notes to explain what your code does.
Many languages share the same comment expression
But some are different
Single line comments
// This is a single line comment in JS
// This is a single line comment in C#
# This is a single line comment in Python
# This is a single line comment in Ruby
Multi-line comments
/* Multi-line comments
in JavaScript */
/* Multi-line
comments in C */
=begin
Multi-Line comment
in Ruby
=end