码迷,mamicode.com
首页 > 其他好文 > 详细

【习题2】注释和#号【第3天】

时间:2016-03-05 11:35:45      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

代码练习

 1 # A comment,this is so you can read your program later.
 2 # Anything after the # is ignore by python
 3 
 4 print "I could have code like this." # and the comment after is ignored
 5 
 6 #You can also use a comment to "disable" or comment out a piece of code:
 7 #print "This won‘t run "
 8 
 9 
10 print "This will run"

运行结果

【╮(╯_╰)╭】

补充:
关于ASCⅡ编码错误:加入下面一行代码
# -*- coding:utf-8 -8-

【习题2】注释和#号【第3天】

标签:

原文地址:http://www.cnblogs.com/liujianqi/p/5244227.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!