Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Compare count to len solution in Clear category for All the Same by kkkkk
from typing import List, Any
def all_the_same(elements: List[Any]) -> bool:
if elements:
return elements.count(elements[0]) == len(elements)
return True
Aug. 20, 2019
Comments: