Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 从 Python 中的列表列表中制作一个扁平列表 在 Python 中 扁平化(不规则的)列表列表
这一定很容易,但我似乎找不到单行/有效的解决方案:
我想转换[(1,2),(3,4),(5,6)]成[1,2,3,4,5,6]
[(1,2),(3,4),(5,6)]
[1,2,3,4,5,6]