(d)
return [ backitems[i][1] for i in range(0,len(backitems))]
Returns the keys of dictionary d sorted by their values
Returns the keys of dictionary d sorted by their values
Returns the keys of dictionary d sorted by their values
def sortByValue(d):
    """ Returns the keys of dictionary d sorted by their values """
    items=d.items()
    backitems=[ [v[1],v[0]] for v in items]
    backitems.sort(); backitems.reverse()
    return [ backitems[i][1] for i in range(0,len(backitems))]
def sortByValue ( d ) : items = d . items ( ) backitems = [ [ v [ 1 ] , v [ 0 ] ] for v in items ] backitems . sort ( ) backitems . reverse ( ) return [ backitems [ i ] [ 1 ] for i in range ( 0 , len ( backitems ) ) ]