如何将两个列表的值分别对应传递给空字典里面的key 和value
aaa = ["a1" , "a2" , "a3" , "a4"] bbb = ["b1" , "b2" , "b3" , "b4"] sss = {} for i in range(len(aaa)): sss[aaa[i]] = bbb[i] print(sss)
懂了 感谢🙏