Follow

不知道有没有大神可以看到这条:请教python 小白问题——明明只有一条数据,可为啥在python里字典里有几个key,提取出几次数值。

· · Web · 3 · 0 · 0

@purplemacaroon 因为你用了for循环,要么直接打印,要么
for key in dict:
print key, value

你的写法相当于
for true 3次:
print hello world

@mashiro 嗯嗯,刚刚明白了,搞定了! :ablobcatheartsqueeze:非常非常非常感谢!😘

Sign in to participate in the conversation
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。