most_frequent solution in Creative category for The Most Frequent by yaokai36
determines the most frequently occurring string in the sequence.
# your code here
return max(data, key = lambda c:data.count(c))
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'
Dec. 29, 2017