2012年3月17日
摘要: Tutorial1. Python可以带命令行启动,具体查看文档2. 注释使用#, 指定文件编码使用:# coding[=:]\s*([-\w.]+) 3. 可以设置python启动脚本,详见tutorial 2.2.4,2.2.54. 在交互模式下,上次计算的结果被保存在变量[_]中5. 字符串(字符串是不可变的) 5.1 'a' * d # 表示将'a'重复五次,即得到'aaaaa' 5.2 使用Slice indices得到子串:str[0:2],str[:2], str[2:] str[-1] # The last character s 阅读全文
posted @ 2012-03-17 23:18 sanlo 阅读(457) 评论(0) 推荐(0) 编辑