官术网_书友最值得收藏!

Commenting Python code

Another thing to discuss is that comments in Python are marked with the # symbol. Comments are used to annotate notes or other information without having Python try to perform an operation on them. For example, the following screenshot demonstrates the use of comments when writing code. It should be noted that, normally, comments in the interactive Python prompt are not used, since it is more of a scratchpad for testing bits of code:

Python comments

You will see later on that, even though Python is a very readable language, it still helps to put comments in your code. Sometimes, it's to explicitly state what the code is doing, to explain a neat shortcut you used, or to simply remind yourself of something while you're coding, like a "to do" list.

主站蜘蛛池模板: 乌什县| 桐梓县| 永仁县| 武隆县| 小金县| 琼结县| 拜城县| 九龙县| 高阳县| 遂川县| 阳西县| 顺昌县| 甘南县| 武安市| 云龙县| 桂阳县| 漯河市| 离岛区| 介休市| 莱阳市| 荥阳市| 秭归县| 阿坝| 江口县| 贵德县| 视频| 铁岭市| 山东省| 房山区| 津市市| 瓦房店市| 南部县| 尚义县| 五大连池市| 广元市| 宝兴县| 临城县| 双牌县| 西华县| 铜鼓县| 迁安市|