摘要: 使用迭代器实现多行输入的获取: 阅读全文
posted @ 2017-06-24 15:30 梓林 阅读(1790) 评论(0) 推荐(0)
摘要: 一、字符编码与转码 先说python2 再说python3 在py3中encode,在转码的同时还会把string 变成bytes类型,decode在解码的同时还会把bytes变回string 转码方式如下图所示: 1 __author__ = 'NL' 2 3 import sys 4 5 pri 阅读全文
posted @ 2017-06-22 23:59 梓林 阅读(128) 评论(0) 推荐(0)
摘要: 一、列表 列表是我们最以后最常用的数据类型之一,通过列表可以对数据实现最方便的存储、修改等操作 1 __author__ = 'NL' 2 import copy 3 4 user_name = ["nilei","zengwei","wqx"] 5 user_name2 = ["xiaofei", 阅读全文
posted @ 2017-06-22 11:11 梓林 阅读(137) 评论(0) 推荐(0)
摘要: 原文地址:http://www.jetbrains.com/help/pycharm/creating-and-editing-file-templates.html#d600783e347 标签: pycharm 修改新建文件时的头部模板 默认为__author__=‘...‘ [省略号是默认你的 阅读全文
posted @ 2017-05-29 22:00 梓林 阅读(814) 评论(0) 推荐(0)
摘要: 一、py2和py3的区别 最大的区别在于,py3对Unicode的支持 官方将在2020年停止对py2.7的支持 One popular module that don't yet support Python 3 is Twisted (for networking and other appli 阅读全文
posted @ 2017-05-21 22:45 梓林 阅读(312) 评论(0) 推荐(0)