def sortByColumn(aList, *args):
    aList.sort(key=lambda x: (x[idx] for idx in args))
return aList
filename = 'file.txt'

def convert_ints(astr):
    pass
Sort a multidimensional list by a variable number of keys