Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created May 27, 2016 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/9b7fc51c0603e463acb008a44d9300ee to your computer and use it in GitHub Desktop.
Save chuck0523/9b7fc51c0603e463acb008a44d9300ee to your computer and use it in GitHub Desktop.
# 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