kuroko/test/testDictComprehension.krk

5 lines
98 B
Python
Raw Normal View History

let d = {'a': 1, 'b': 2, 'c': 3}
let dInverted = {v: k for k, v in d.items()}
print(d,dInverted)