hackerrank icon indicating copy to clipboard operation
hackerrank copied to clipboard

Results 3 hackerrank issues
Sort by recently updated
recently updated
newest added

Your code might be correct but then there's a locked code which you can't override

This code , when run on python 2 , produces the required output i.e, sorts the list. But when run on python 3 , the sort function does not work....

from collections import Counter n=int(input()) l=list(input() for i in range(n)) m=Counter(l) print(len(m)) for i in m: print(m[i],end=" ")