I have a problem, to sort the python list based on occurrence of elements.
for example:
#input list:
l = [5,5,5,2,2,4,4,4,4,1]
#output list
[4, 4, 4, 4, 5, 5, 5, 2, 2, 1]
I am able to solve the problem but i have used 3 loops, can anybody help me to do this in some pythonic way using a single loop. if you want i can share my solution. Thanks