i had stored result in dictionary as
playerStats={'Murray':[2,2,16,143,13,142],'Djokovic':[3,1,13,142,16,143],'Muguruza':[0,0,1,12,2,15],'Williams':[0,1,2,15,1,12]}
Now i want to print output in decreasing order of ranking, where the ranking is according to the criteria 1-6 in that order (compare item 1, if equal compare item 2, if equal compare item 3 etc, noting that for items 5 and 6 the comparison is reversed).
print out the following.....
Djokovic 3 1 13 142 16 143
Murray 2 2 16 143 13 142
Williams 0 1 2 15 1 12
Muguruza 0 0 1 12 2 15
where criteria 1-6 are...
1. Number of best-of-5 set matches won
2. Number of best-of-3 set matches won
3. Number of sets won
4. Number of games won
5. Number of sets lost
6. Number of games lost
What I have tried:
playerNames=['Djokovic','Williams','Muguruza','Murray']
n=0
if playerStats[playerNames[n]][0]>playerStats[playerNames[n+1]][0] and playerStats[playerNames[n]][0]>playerStats[playerNames[n+2]][0] and playerStats[playerNames[n]][0]>playerStats[playerNames[n+3]][0]:
print(playerNames[n],playerStats[playerNames[n]][0],playerStats[playerNames[n]][1],playerStats[playerNames[n]][2],playerStats[playerNames[n]][3],playerStats[playerNames[n]][4],playerStats[playerNames[n]][5])
if playerStats[playerNames[n+1]][0]>playerStats[playerNames[n+2]][0] and playerStats[playerNames[n+1]][0]>playerStats[playerNames[n+3]][0]:
print(playerNames[n+1],playerStats[playerNames[n+1]][0],playerStats[playerNames[n+1]][1],playerStats[playerNames[n+1]][2],playerStats[playerNames[n+1]][3],playerStats[playerNames[n+1]][4],playerStats[playerNames[n+1]][5])
if playerStats[playerNames[n+1]][0]>playerStats[playerNames[n+2]][0] and playerStats[playerNames[n+1]][0]>playerStats[playerNames[n]][0] and playerStats[playerNames[n+1]][0]>playerStats[playerNames[n+3]][0]:
print(playerNames[n+1],playerStats[playerNames[n]][0],playerStats[playerNames[n]][1],playerStats[playerNames[n]][2],playerStats[playerNames[n]][3],playerStats[playerNames[n]][4],playerStats[playerNames[n]][5])