列表轉字典python
it = [1,2,3,4] print(dict(zip(it, it))) # {1: 1, 2: 2, 3: 3, 4: 4} it = iter(it) print(dict(zip(it, it))) # {1: 2, 3: 4}