Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/322.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Python中组合多个列表_Python_Python 3.x_List - Fatal编程技术网

如何在Python中组合多个列表

如何在Python中组合多个列表,python,python-3.x,list,Python,Python 3.x,List,如果我有这些列表,我将如何获得新的列表 listA = ["A", "B", "C"] listB = ["1", "2", "3"] listC = ["!", "@", "#"] 使用: 使用: 那很快。。。那很快。。。美好的 [("A", "1", "!"), ("B", "2", "@"), ("!", "@", "#")] list(zip(listA,listB,listC)) [('A', '1', '!'), ('B', '2', '@'), ('C', '3', '#

如果我有这些列表,我将如何获得新的列表

listA = ["A", "B", "C"]

listB = ["1", "2", "3"]

listC = ["!", "@", "#"]
使用:

使用:


那很快。。。那很快。。。美好的
[("A", "1", "!"), ("B", "2", "@"), ("!", "@", "#")]
list(zip(listA,listB,listC))

[('A', '1', '!'), ('B', '2', '@'), ('C', '3', '#')]