ici*_*ing 0 python dictionary loops
我正试图将一个字典附加到列表中.我在网站上已经看过几次这个问题,但是使用.copy()提出的解决方案似乎没有解决问题.我是否还需要循环我的附加变量?
for page in pages :
if 'http' in page :
machineList = []
machine = getPinballMachine(page, siteURL) # this function returns a dict(ionary) of elements from a webpage
machineList.append(machine.copy())
print (machineList)
Run Code Online (Sandbox Code Playgroud)
只打印最终字典.
| 归档时间: |
|
| 查看次数: |
47 次 |
| 最近记录: |