EasyOutput prediction
any() and all() short-circuit
What does this code print?
nums = [2, 4, 6, 8, 10] print(all(n % 2 == 0 for n in nums)) print(any(n > 5 for n in nums))
← → arrow keys to navigate
Sign in to save your progress.
What does this code print?
nums = [2, 4, 6, 8, 10] print(all(n % 2 == 0 for n in nums)) print(any(n > 5 for n in nums))
← → arrow keys to navigate
Sign in to save your progress.