立即学习:https://edu.csdn.net/course/play/26755/340123?utm_source=blogtoedu
# 快速调换字典中的key和value
d = {'a': 1, "b": 2}
print({v: k for k, v in d.items()})
# 生成0->100的list
print([i for i in range(0, 100 + 1)])
立即学习:https://edu.csdn.net/course/play/26755/340123?utm_source=blogtoedu
# 快速调换字典中的key和value
d = {'a': 1, "b": 2}
print({v: k for k, v in d.items()})
# 生成0->100的list
print([i for i in range(0, 100 + 1)])