如何快速调换字典中的 key 和 value
d = {'a':1, 'b': 2}
print({v:k for k, v in d.items()})
{1: 'a', 2: 'b'}
如何用循环快速生成一个从0到100的列表(0,1,2,...,100)
print([i for i in range(101)])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,