列表和集合 / 字典

# Empty dictionary
d1 = {}
d2 = dict()

# init with some data
d3 = {1"one"2"two"}
d4 = dict(one=1, two=2)
# d4 is {'one': 1, 'two': 2}

d5 = dict(d4, three=3)
# d4 is {'one': 1, 'two': 2, 'three': 3}

print(f'{d1 = }')
print(f'{d2 = }')
print(f'{d3 = }')
print(f'{d4 = }')
print(f'{d5 = }')