Need to set up an array (or list) in the following format: 12 100 200
, 14 122 134
, 1 456 218
, 89 23 844
and so on. These are input by the user; using the code I've written `
while(i < number):
s = input()
a, b, c = s.split(' ')
intermediate_a = int(a)
intermediate_b = int(b)
intermediate_c = int(c)
id.append(intermediate_a)
game_one.append(intermediate_b)
game_two.append(intermediate_c)
i = i + 1
I have stored the ids, game1 scores and game2 scores in different lists. I am trying to store them in one array/list so that I can sort them based on different columns (either game1 score or game2 score). First, I am trying to sort all the players based on their scores (game_one) and rank them (1, 2, 3...) accordingly. I am trying to do that and add up another column with the gamer ranks. I am trying to do the same WITHOUT using numpy, just lists or arrays. Any help would be awesome. Thanks.