# A comment, this is so you can read your program later.
# 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 a piece of code:
# print "This won't run."
print "This will run."
心得:养成规范化注释的习惯很重要
Python注释规范
本文介绍了Python中注释的基本用法及重要性。包括单行注释的写法、如何使用注释来禁用代码片段等内容,并强调了养成良好注释习惯的重要性。
2万+

被折叠的 条评论
为什么被折叠?



