![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
GuisengLiu
这个作者很懒,什么都没留下…
展开
-
Pickle模块:dump、load方法
pickle.dump pickle.loadPickle模块实现了基本的数据序列与反序列化pickle.dump(obj, file, [,protocol])pickle.load(file) Pickle模块实现了基本的数据序列与反序列化 pickle.dump(obj, file, [,protocol]) 序列化对象,将对象obj保存到文件file中去。参数protocol是序列化模式...转载 2019-07-11 08:46:58 · 412 阅读 · 0 评论 -
count()方法
Python count() 方法用于统计字符串里某个字符出现的次数。可选参数为在字符串搜索的开始与结束位置。 str.count(sub, start= 0,end=len(string)) sub – 搜索的子字符串 start – 字符串开始搜索的位置。默认为第一个字符,第一个字符索引值为0。 end – 字符串中结束搜索的位置。字符中第一个字符的索引为 0。默认为字符串的最后一个位置。 返...原创 2019-07-11 09:23:40 · 406 阅读 · 0 评论 -
字典 update()方法
描述 Python 字典 update() 函数把字典参数 dict2 的 key/value(键/值) 对更新到字典 dict 里。 语法 dict.update(dict2) dict2 – 添加到指定字典dict里的字典。 该方法没有返回值 ...原创 2019-07-11 09:57:28 · 2179 阅读 · 0 评论