从列表/集中删除dict_values

时间:2017-10-31 18:41:30

标签: python

代码:

candidates_new_fp_votes = {'a': 24, 'b': 0, 'c': 17, 'd': 23, 'e': 0}
print(candidates_new_fp_votes)
tst_list = candidates_new_fp_votes.values()
print(tst_list)

print(tst_list)输出dict_values([24,0,17,23,0])

如何将tst_list变为[24,0,17,23,0]

提前致谢

0 个答案:

没有答案