Am 15.10.2016 um 01:33 schrieb 38016226...@gmail.com:
nums=['3','30','34','32','9','5'] I need to sort the list in order to get the largest number string: '953433230'nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True) But how to do this in python 3?
https://docs.python.org/3/library/functools.html#functools.cmp_to_key | Transform an old-style comparison function to a key function. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list