[Solved] How to sort sum digits from the following list [closed]


Sorting list items considering unit’s place. You can try:

list1 = [1236,985,150,641876,167] 
sorted(list1, key=lambda n: n%10)
[150, 985, 1236, 641876, 167]

solved How to sort sum digits from the following list [closed]