目前,我正在从网络上抓取数据,并希望将其输出为CSV。一切工作正常,但是一旦我在迭代中追加多个列表,该列表的格式就会错误。
我从这样的事情开始:
list = [a, b, c]
list_two = [d, e, f]
list_three = [g, h, i]
第一次迭代:
list = [list, list_two]
# list = [[a, b, c], [d, e, f]]
第二次迭代:
list = [list, list_three]
我得到:
# list = [[[a, b, c], [d, e, f]], [g, h, i]]
我希望有:
# list = [[a, b, c], [d, e, f], [g, h, i]]
请帮我!我想这是一件容易的事,但我不明白。而且我实际上很难找到有关如何附加列表的信息。
小唯快跑啊
慕桂英3389331
相关分类