The Most Frequent

The Most Frequent

You have a sequence of strings, and you’d like to determine the most frequently occurring string in the sequence. It can be the only one.

example

Input: Non-empty list of string (str).

Output: A string (str).

Examples:

assert most_frequent(["a", "b", "c", "a", "b", "a"]) == "a"
assert most_frequent(["a", "a", "bi", "bi", "bi"]) == "bi"
40