First solution in Speedy category for The Most Frequent by YagamiXYZ
determines the most frequently occurring string in the sequence.
# your code here
return max(set(data), key=data.count)
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
'a', 'b', 'c',
]) == 'a'
assert most_frequent(['a', 'a', 'bi', 'bi', 'bi']) == 'bi'
Oct. 20, 2017