Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
"The fastest horse" solution in Clear category for The Fastest Horse by tigerhu3180
def fastest_horse(horses: list) -> int:
#replace this for solution
list1=[i.index(min(i))+1 for i in horses]
dict1={i:list1.count(i) for i in set(list1)}
return max(dict1,key=lambda x:dict1[x])
if __name__ == '__main__':
print("Example:")
print(fastest_horse([['1:13', '1:26', '1:11']]))
#These "asserts" using only for self-checking and not necessary for auto-testing
assert fastest_horse([['1:13', '1:26', '1:11'], ['1:10', '1:18', '1:14'], ['1:20', '1:23', '1:15']]) == 3
print("Coding complete? Click 'Check' to earn cool rewards!")
April 25, 2018