8
SaiPavanKumar Muppalaneni
Last seen 4 years ago
Member for 4 years, 6 months, 18 days
Difficulty Normal
can it be more simple like this ?
for x in items:
temp.append([x, items.count(x), len(items)-items.index(x) ])
temp = sorted(temp, key = operator.itemgetter(1,2) , reverse = True);
More
There is always a simple logic , think of it before coding.
More
You could have explained it clearly in comments and in between u r awesome.
More