Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lst = [1,2,3]
- first_or_default = next((x for x in lst if x == 10), None)
- print first_or_default
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement