Python Dictionary 字典
Python Dictionary 字典
// 仅用作自学笔记会经常更新,如有错误欢迎指正,谢谢
创建字典
直接使用大括号 {}dictionary = {'name': 'Grant', 'age': 3, 'gender': 'male', 'student_id': 3013}
使用 dict# 第一种,需要注意要用 "="
dictionary = dict(name= 'Grant', age = 3, gender = 'male', student_id = 3013)
# 第二种,通过
原创
2021-06-06 20:52:11 ·
113 阅读 ·
0 评论