方法一:Key Value 直接获取databases = {1: 'Student', 2: 'School'} for k,v in databases.items(): print(k,v)1 Student 2 School方法二:通过循环Key获取Valuedatabases = {1: 'Student', 2: 'School'} for k in databases: print(k,databases[k])