python.items
时间: 2023-10-12 07:05:18 浏览: 88
在Python中,字典的items()方法返回一个包含字典中所有项的列表。这个方法的调用格式是:变量.items()。例如:x = {'title':'python web site','url':'www.iplaypy.com'},那么x.items()将返回这个方法的调用格式是:变量.iteritems()。例如:f = x.iteritems(),那么list(f)将返回<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [item()和iteritem(),python3.X中items()](https://blog.csdn.net/liukai2918/article/details/78307271)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Python items() 方法](https://blog.csdn.net/m0_51339444/article/details/128768549)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文