我有一个像这样的列表字典:
l = [{'d':1},{'d':2}]
我想要的输出是 dict 值的元组:
t = (1,2)
我试过 for 循环,但有没有更好的解决方案?任何内置函数?我想要最好的pythonic方式来做到这一点,提前致谢。
dictionary tuples list python-3.x
dictionary ×1
list ×1
python-3.x ×1
tuples ×1