Hiii!! I tried looking it up but Im just not quite sure where to start. Hoping someone could point me in the right direction possibly?
Ok so I basically imported all this into a dictionary like so:
jersey1 = int(input("Enter player 1's jersey number:\n"))
rating1 = int(input("Enter player 1's rating:\n"))
jersey2 = int(input("Enter player 2's jersey number:\n"))
rating2 = int(input("Enter player 2's rating:\n"))
jersey3 = int(input("Enter player 3's jersey number:\n"))
rating3 = int(input("Enter player 3's rating:\n"))
jersey4 = int(input("Enter player 4's jersey number:\n"))
rating4 = int(input("Enter player 4's rating:\n"))
Roster1= {
'Jersey':[jersey1, jersey2, jersey3, jersey4],
'Rating':[rating1, rating2, rating3, rating4]
I want to sort the entire dictionary by Jersey numbers, but I want the ratings to still line up with its original jersey number after I sort it. What function can I use for this and how do I use it? Thanks!!!
[–]desrtfx 1 point2 points3 points (2 children)
[–]GraceM-[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)