any won’t go beyond the first element if it’s True. In case the iterator yields something false-ish you can write any(True for _ in iterator).
any won’t go beyond the first element if it’s True. In case the iterator yields something false-ish you can write any(True for _ in iterator).