I've used a draft code and adapted it to suit my code but I don't know how to split the data. The question might seem a vague so I'll try to be help by saying what I want. My code:
import csv
with open("scores.csv") as csv_data:
reader=csv.reader(csv_data,delimiter=",")
number_sorted=sorted(reader,key=lambda x:int(x[0]),reverse=True)
print(number_sorted)
I get the output:
[['25356767', 'tom'], ['443388', 'jin'], ['6744', 'trev'], ['4666', 'ryan'],
['2445', 'jones'], ['536', 'sue'], ['34', 'bob'], ['8', 'hera'], ['1',
'bill'], ['0', 'v']]
but I want the print to look like this so it looks like a leader board:
`[['25356767', 'tom'],
['443388', 'jin'],
['6744', 'trev'],
['4666', 'ryan'],
['2445', 'jones'],
['536', 'sue'],
['34', 'bob'],
['8', 'hera'],
['1', 'bill'],
['0', 'v']]`
I hope that explains my question.