I have a text file in this format:
19-2 : (28, 33, 40),
15-3 : (28, 33, 43),
12-4 : (28, 33, 45),
9-5 : (28, 33, 47),
8-6 : (28, 33, 48),
5-7 : (28, 33, 50),
3-8 : (28, 33, 52),
0-9 : (28, 33, 55),
0-10 : (28, 33, 57),
etc.
I'd like to use python to sort lines in ascending order by the first number and then by the number after the "-". Any tips you can give me on how to approach this problem?
Thanks!
EDIT: I should have mentioned, these files are millions of lines long, so I can't actually store them in memory...