Created
May 27, 2016 23:03
-
-
Save chuck0523/9b7fc51c0603e463acb008a44d9300ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: UTF-8 | |
# 複数検索。たぶんもっとスマートな書き方がありそう。 | |
nums = [1, 2, 3, 4, 5] | |
print(True in list(map(lambda n: n in [1, 2], nums))) # True | |
print(True not in list(map(lambda n: n in [1, 2], nums))) # False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment