2019年4月28日
摘要: import pickle """将对象转化为硬盘能识别的bytes的过程被称为序列号。pickle可以把任意python类型的数据转化为字节"""print(pickle.dumps("中")) print(type(pickle.dumps("中"))) print(pickle.dumps([ 阅读全文
posted @ 2019-04-28 14:24 lilyxiaoyy 阅读(967) 评论(0) 推荐(0) 编辑
摘要: 1. 上周内容回顾 1. 闭包: 内层函数对外层函数变量的使用 def outer(): a = 10 def inner(): print(a) return inner ret = outer() ret() ret() ret() ret() 2. 迭代器 dir() 查看某变量能执行哪些操作 阅读全文
posted @ 2019-04-28 11:44 lilyxiaoyy 阅读(211) 评论(0) 推荐(0) 编辑
摘要: ''' 二分法查找 有序列表 掐头去尾取中间 查找列表中xx在不在列表中,在,则返回索引值 ''' # lst = [1, 4, 6, 8, 9, 21, 23, 26, 35, 48, 49, 54, 67, 89, 99] #使用in判断,不使用二分法 # n = 49 # for i, v i 阅读全文
posted @ 2019-04-28 11:24 lilyxiaoyy 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 内置函数导图:https://www.processon.com/view/link/5b4ee15be4b0edb750de96ac#map '''python中的内置函数分类 1、输入输出:print、input 需要注意的是input输入的数据是字符串类型。 ''' print("Hello 阅读全文
posted @ 2019-04-28 10:28 lilyxiaoyy 阅读(227) 评论(0) 推荐(0) 编辑

返回
顶部