仅适用于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())
欢迎分享,转载请注明来源:内存溢出
仅适用于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())
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)