def solution(param: list) -> bool: """Returns True if atleast 2 out of 3 booleans are True.""" filtered_values = [v for v in param if isinstance(v, bool)] return filtered_values.count(True) > 1
- def solution(param: list) -> bool:
- """Returns True if atleast 2 out of 3 booleans are True."""
return sum([1 for a in param if str(a) == 'True' and type(a) == bool]) >= 2- filtered_values = [v for v in param if isinstance(v, bool)]
- return filtered_values.count(True) > 1