随笔分类 - PYTHON
摘要:字符编码 1、python 2.x 默认是ASCII 编码 不支持中文,所以在代码有中文的时候 需要在文件最上一行加上#coding=utf-8。python 3.x则没有该问题。 变量命名规则 1、在python里,标识符有字母、数字、下划线组成。 2、在python中,所有标识符可以包括英文、数
阅读全文
摘要:1、hello world! import this print "hello world!" 2、判断语句 注意导入编码utf-8 否则打印中午报错 3、循环语句 输出0-100 所有自然数 但是不包括100 for i in range(0,100): print (i) 注意python不支持
阅读全文

浙公网安备 33010602011771号