1 Star 0 Fork 0

闲云野鹤/python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
dist.py 468 Bytes
一键复制 编辑 原始数据 按行查看 历史
tian 提交于 2015-07-16 00:00 . python 的学习笔记
#python dict字典 dict的字典,使用键值对处理
#list列表
name1=['m','b','t']
name2={"a":'this is test',"n":"test"}
print (name1)
print(name2['a'])
#和list比较
#查找喝插入的速度极快
#需要占用大量的内存,内存浪费多
#dist的key必须是不可变的对象
#set 也是一组key的集合 但是不存储value
s=set([1,2,3])
print(s)
#可以通过add 加入set里面
s.add(6)
print(s)
#通过remove 删除元素
s.remove(2)
print(s)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/xianyunyehe/python.git
git@gitee.com:xianyunyehe/python.git
xianyunyehe
python
python
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385