How to present this code as a list comprehension:
def all_targets_hit(attempts: list) -> bool:
for ls in range(len(attempts)):
if not any(attempts[ls]):
return False
return True
attempts =([
[True, False, False],
[False, False, True],
[False, False, False, False],
])
#Expected: False
return.lswill never get past 0. What do you want this to do?return all(any(attempt) for attempt in attempts)