相关疑难解决方法(0)

如何知道Python有序字典中项目的位置

我们能否知道Python有序字典中项目的位置?例如:

如果我有字典:

// Ordered_dict is OrderedDictionary

Ordered_dict = {"fruit": "banana", "drinks": "water", "animal": "cat"}
Run Code Online (Sandbox Code Playgroud)

现在如何知道猫属于哪个位置?是否有可能得到如下答案:

cat 或以其他方式?

python ordereddictionary

33
推荐指数
2
解决办法
4万
查看次数

标签 统计

ordereddictionary ×1

python ×1