- 如下为例
# -*- coding: utf-8 -*-
# 不带上面那行在powershell上执行会出错,汉字编码和英文的不一样,在注释#的右边也不行。
print "Mary had little lamb."
# 将 字符串snow放到%s的位置上,snow一定带上""或者'',不然会出错。snow不是变量,是一个单词snow的字符串。变量名不带引号。
print "Its fleece was white as %s." % 'snow'
具体的看自己改的代码ex6comment.py