Python练习-- dict and set
来源:互联网 发布:java推荐系统 编辑:程序博客网 时间:2024/05/17 23:01
#!/usr/bin/env python3# -*- coding: utf-8 -*-d = {'Michael': 95,'Bob': 75,'Tracy': 85}print(d['Bob'])d['Adam'] = 67print(d)print('Thomas in d?? %s' % ('Thomas' in d))print('d.get(\'Thomas\'): %s' % d.get('Thomas'))print(d.pop('Bob'))print(d)# =========== set =====================print("=========== set =====================")s = set([1, 2, 3])print('s :',s)s.add(4)print(s)s1=set([1,2,3])s2=set([2,3,4])print('s1 :',s1)print('s2 :',s2)print('s1 & s2 :',s1 & s2)print('s1 | s2 :',s1 | s2)
0 0
- Python练习-- dict and set
- Python-dict AND set
- Python学习-Dict and Set
- [Python]dict,set
- Python dict,set学习
- python dict和set
- Python dict和set
- The study dict and set in Python(20170906)
- Python--使用dict和set
- python的dict与set
- Python(Dict和Set类型)
- python:中dict和set
- python中的集合dict&set
- python list tuple dict set
- 【Python】6“dict和set“
- python dict 和set 详解
- Python list,Dict和Set
- python dict和set 用法
- Web应用中的轻量级消息队列
- 抽象类 接口
- AndroidStudio插件GsonFormat快速实现JavaBean
- 控制反转(IoC)与依赖注入(DI)
- Redis 监控工具 Redis-monitor
- Python练习-- dict and set
- 消息队列各类MQ比较
- 程序员都会的 35 个 jQuery 小技巧
- js跨域
- ie7 css hack
- SOLARIS: Determining Background Process Size using pmap (文档 ID 107750.1)
- 静态库遇到的问题
- Linux/Unix/Mac命令总结
- eclipse 版本打开出错