Python中的dict中的元组列表[重复]

Python中的dict中的元组列表[重复],第1张

Python中的dict中的元组列表[重复]

仅适用于Python 2.x(感谢Alex):

yourdict = {}# ...items = yourdict.items()

有关详细信息,请参见http://docs.python.org/library/stdtypes.html#dict.items。

仅适用于Python 3.x(摘自Alex的答案):

yourdict = {}# ...items = list(yourdict.items())


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5642957.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存