我目前的列表看起来像这样
list = [['hate', '10'], ['would', '5'], ['hello', '10'], ['pigeon', '1'], ['adore', '10']]
Run Code Online (Sandbox Code Playgroud)
我想把它转换成这样的字典
dict = {'hate': '10', 'would': '5', 'hello': '10', 'pigeon': '1', 'adore': '10'}
Run Code Online (Sandbox Code Playgroud)
因此,基本上list [i][0]将是关键,list [i][1]将是价值观.任何帮助将非常感激 :)