Sample Input
20, 71146620
100, 26867616
10, 02513583
10, 52811698
100, 23859051
I read it in from a file as a command line
You can sort the lines as strings, by using a key function
def two_ints(s):
return map(int, s.split(","))
with open("num.txt") as f:
for line in sorted(f, key=two_ints):
print line
It really depends whether you want the result to be a list of strings, or a list of lists of ints.
Once you have converted to int, there is no way to recover the leading zero on "02513583", so leaving the result as strings may be preferable