iNTERFACEWARE Products Manual > Learning Center > Learning Python > Working With Values and Variables > Comments |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Python allows you to add comments to a script, which you can use to explain what your script is doing. In Python, any line that starts with the pound (#) character is considered a comment. For example, the following script has a comment as its first line:
Comments are always ignored by Python, so you can write whatever you want in them. Comments can be on multiple lines, provided you include a # character before each line:
You can also append a comment to any line of code. Whenever Python sees the # character, it assumes that the rest of the line is a comment and can be ignored. For example:
|