OrderedDict 用于旧版本的 python [英] OrderedDict for older versions of python

查看:59
本文介绍了OrderedDict 用于旧版本的 python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有序字典是非常有用的结构,但不幸的是,这些都是最近才在 3.12.7.如何在旧版本中使用有序字典?

Ordered dictionaries are extremely useful structures, but unfortunately these are quite recent only working in versions from 3.1 and 2.7. How can I use an ordered dictionary in older versions?

推荐答案

我在 python 2.6 上用 pip 安装了ordereddict

I installed ordereddict on python 2.6 with pip

pip install ordereddict

这篇关于OrderedDict 用于旧版本的 python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆