方法一:Key Value 直接获取
databases = {1: 'Student', 2: 'School'} for k,v in databases.items(): print(k,v)
1 Student 2 School
方法二:通过循环Key获取Value
databases = {1: 'Student', 2: 'School'} for k in databases: print(k,databases[k])
来源:https://www.cnblogs.com/leoshi/p/12298142.html