python(一)

一,代码注释

单行注释,使用“#”,多行注释,使用三个单引号或者双引号,

比如

"""print("helloworld")"""

是注释,

或者

'''print("helloworld")'''

也是注释。

 

二,python2中文编码问题

文件第一行添加:

# coding=utf-8

或者使用官方推荐的:

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

 

posted @ 2019-04-01 14:14  往事零落碾作尘  阅读(128)  评论(0编辑  收藏  举报