gpt4 book ai didi

python - 在 python 中创建新的列表对象

转载 作者:太空狗 更新时间:2023-10-29 17:55:42 25 4
gpt4 key购买 nike

<分区>

我是 python 初学者。我想在 python 中创建新的列表对象。

我的代码:

recordList=[]

mappedDictionay={}

sectionGroupName= None

for record in recordCols:
item = record
print item

if not sectionGroupName == record[0]:
sectionGroupName = record[0]
del recordList[0:] # Here I want to create new list object for recordList
recordList.append(item)
mappedDictionay[sectionGroupName] = recordList
else:
recordList.append(tempItem)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com