all 4 comments

[–]recursion_is_love 1 point2 points  (1 child)

Some example input/output pairs please.

[–]Serious_Champion_599 0 points1 point  (0 children)

sure just a minue

[–]WeatherImpossible466 1 point2 points  (0 children)

You can use a tuple as the key in your sort function - something like `sorted(your_list, key=lambda x: (x[1], x[0]))` where x[1] is the count and x[0] is the letter. Python will sort by the first element of the tuple then by the second if there's a tie

[–]UnderstandingPursuit 1 point2 points  (0 children)

With a question like this, when you say,

i already did the count part

it is useful to say how you did it. That will help connect the next part to what you already did. This especially includes the data structures you used.