且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从“列表"创建子列表

更新时间:2023-12-04 20:40:22

如果您已经阅读了列表列表,请使用 zip() 将列转换为行:

If you have read a list of lists, use zip() to turn columns into rows:

file_result = [
    ['19df', 'b35d']
    ['fafa', 'bbaf']
    ['dce9', 'cf47']
]

a, b = zip(*file_result)