• + 3 comments
    input = 'aabbbccde'
    from collections import Counter
    c=Counter(input)
    k = c.most_common(3)
    print((a,b) for (a,b) in k)
    
    I am getting this output 
    Anyone please explain 
    
    <generator object <genexpr> at 0x000002884DEF6318>
    
    
        Also why did u use sorted function here