Single Line Comments

Single Line Comments

You may have noticed the instructions in the editor that begin with a # (pound or hash) symbol. These lines of code are calledcomments, and they aren't read by the interpreter—they don't affect the code at all. They're plain English comments written by the programmer to provide instructions or explain how a particular part of the program works.

Since this improves the readability of your code tremendously (and will help you debug programs more quickly, since you'll be able to tell at a glance what each part of the program is supposed to do), we encourage you to comment on your code whenever its purpose isn't immediately obvious.

你可能感兴趣的:(python)