[Head First Python]2. python of comment

1- 多行注释 ''' ''' 或 """ """

'''this is the standard way to include a

multiple-line comment in you code'''

"""this is the standard way to include a

multiple-line comment in you code"""

2- 单行注释 #

# this is comment

3- 中文注释

 #_*_ coding:utf-8 _*_
import nester
cast = ["hello","kitty",["world",["Jerry"]],"program",["Java","C"],"test"]
nester.print_lol(cast, True) #中文注释

中文注释文件第一行需要写入代码,告知python使用的编码方式

#_*_ coding:utf-8 _*_

reference:

http://15975604853.blog.163.com/blog/static/1182880352012116574235/

上一篇:Ajax调用WebService(一)


下一篇:python自动化测试入门篇-jemter参数化