11 2020 档案

摘要:keys()描述 Python 字典(Dictionary) keys() 函数以列表返回一个字典所有的键。 语法 dict.keys() 例题 users = { 'username':'efermi', 'first':'enrico', 'last':'fermi',}for dict_key 阅读全文
posted @ 2020-11-30 16:30 Z小訾 阅读(300) 评论(0) 推荐(0)
摘要:1.一个简单的字典 alien_0 ={"color":"green","points" : 5}print(alien_0["color"])print(alien_0["points"])2.添加键-值对 alien_0 ={"color":"green","points" : 5}print( 阅读全文
posted @ 2020-11-02 16:59 Z小訾 阅读(108) 评论(0) 推荐(0)