# 字典生成式
print('字典的值是:',{i: i**3 for i in range(10)})
# --------反推字典生成式------------
dic={}
for n in range(10):
dic[n]=n**3
print('我的值是',dic)
字典的值是: {0: 0, 1: 1, 2: 8, 3: 27, 4: 64, 5: 125, 6: 216, 7: 343, 8: 512, 9: 729}
我的值是 {0: 0, 1: 1, 2: 8, 3: 27, 4: 64, 5: 125, 6: 216, 7: 343, 8: 512, 9: 729}