小编gm0*_*m03的帖子

迭代字典中的键和值

如何访问字典的键和值并迭代 for 循环?

dictionary = {1: "one", 2: "two", 3: "three"}
Run Code Online (Sandbox Code Playgroud)

我的输出将是这样的:

1  one
2  two
3  three
Run Code Online (Sandbox Code Playgroud)

python dictionary

3
推荐指数
1
解决办法
7867
查看次数

标签 统计

dictionary ×1

python ×1