python中的注释和#号

python第二课,了解一下python中注释的用法
…在每行的最前面加一个#即可

 # A comment,this is so you can read your program laterself.
 # Anything after the # is ignored by python.

print("I could have code like this.")

 # and the comment after is ignored
 # You can also use a comment to "disable" or comment out code:
 # print("This won't run.")

print("This will run.")

在这里插入图片描述

运行效果:
在这里插入图片描述

没有更多推荐了,返回首页