I know that this sounds trivial but I did not realize that the sort() function of Python was weird. I have a list of \"numbers\" that are actually in string for
sort()
Seamus Campbell's answer doesnot work on python2.x. list1 = sorted(list1, key=lambda e: int(e)) using lambda function works well.
list1 = sorted(list1, key=lambda e: int(e))
lambda