01 2016 档案

摘要:字符编码 编程规范(PEP8) 变量1.常量(用大写) 2.变量 常用类型:str 、int、float、 long、bool 字串格式化: %d 整数 %2d占两位 %02d占两位用0填充%f 浮点数%.2f取两位小数%s字符串%x十六进制整数%%表示 %#单行注解'''多行注解 >>>n = " 阅读全文
posted @ 2016-01-23 08:34 tec2019 阅读(174) 评论(0) 推荐(0)
摘要:python2.x版本与3.x版本的语法差异1、python 3.x print 输出的语加必须加上() e.g print"hello world" 在3.x版本变为了print("hello world")2、python2.x版本里的raw_input 在3.x里变为了input。即 3.x版... 阅读全文
posted @ 2016-01-18 19:07 tec2019 阅读(143) 评论(0) 推荐(0)