Created
May 27, 2016 22:59
-
-
Save chuck0523/be4c8e35bbfd9ebf9f0f04b3f1c1760c 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] | |
# in: 存在確認 | |
print(2 in nums) # True | |
print(6 in nums) # False | |
# not in: 非存在確認 | |
print(2 not in nums) # False | |
print(6 not in nums) # True | |
# 関数ではなく演算子 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment