I'll try and reexplain my question down here. I'm trying to create a program which will allow the user to input a players name and their jersey number which will put it into a dictionary. The next function will read the dictionary and print out Player Name: NAME, Jersey Number: NUMBER where name is the name in the dictionary and number is their corresponding jersey number. I can't figure out how to make it so that the names and corresponding jersey number are organized by the number. Here is what I have so far:
def print_roster(team):
   team1=sorted(team.values())
   for x in range(len(team)):
      print('Player Name: %s, Jersey Number: %d' % (NAME, team1[x]))
 
     
    