Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我坚持做这个练习。它要求我从包含字典的列表中打印出来,但我什至不知道该怎么做。我在谷歌上找不到如何做这样的事情......
这是我发现的更有效的答案:
for persons in students: for grades in persons: print persons[grades]
下次您应该更仔细地指定您的问题是什么。下面是练习要求的循环。
for s in students: print s['name'] print s['homework'] print s['quizzes'] print s['tests']