会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
神秘人yy
博客园
首页
新随笔
联系
订阅
管理
2020年7月15日
字典的增删改查
摘要: 1、增 (1)dic={'name':'翻弟','age';17} dic['gender']='woman' print(dic) (2)dic={'name':'翻弟','age';17} re=dic.setdefault('gender','woman') print(dic) 2、删 (1
阅读全文
posted @ 2020-07-15 17:29 神秘人yy
阅读(113)
评论(0)
推荐(0)
2020年7月14日
字典
摘要: 1、通过添加空列表 dic={} print(dic) 2、通过直接赋值 dic={‘ni’:1,‘wo’:2} print(dic) 3、通过dict和关键字 dic=dict(hao=1,ni=2) print(dic) 4、通过列表转化字典 dic=dict[(ni,1),(hao,2)] p
阅读全文
posted @ 2020-07-14 20:44 神秘人yy
阅读(120)
评论(0)
推荐(0)
2020年7月8日
python预科001
摘要: 1.认识一下列表list清单列表list_01=[1,2,3,4,5,6]print(type(list_01))2.创建列表的方式(1)方式一l1=[1,2,3](2)方式二re=list()print(re){list(可迭代对象)list_01=list(range(9))print(list
阅读全文
posted @ 2020-07-08 16:32 神秘人yy
阅读(94)
评论(0)
推荐(0)
公告