我有一个列表的以下元素,该列表有 100 个元素长.
I have the following element of a list, and the list is 100 elements long.
[(50, (2.7387451803816479e-13, 219))]
如何将每个元素转换成这样?
How do I convert each element to look like this?
[(50, 2.7387451803816479e-13, 219)]
[(a, b, c) for a, (b, c) in l]
元组打包和解包解决了这个问题.
这篇关于如何在python中展平元组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!