Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def foo(x):
- print(x)
- return x
- >>>all([foo(x) == 3 for x in range(10)])
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- False
- >>> all((foo(x) == 3 for x in range(10)))
- 0
- False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement