# -*-coding:utf-8 -*-
# @Time : 11:44
# @Author: 黄荣津
# @File : 10.字典的创建.py
# @Software: PyCharm
'''字典的创建方式'''
#使用{}创建字典
scores={'张三':100, '李四':98, '王五':45}
print(scores)
print(type(scores))
#使用内置函数dict()
student=dict(name='jack',age=20)
print(student)
#空字典
d={}
print(d)
python 字典的创建
最新推荐文章于 2023-10-30 16:03:03 发布