二十五岁时我们都一样愚蠢、多愁善感,喜欢故弄玄虚,可如果不那样的话,五十岁时也就不会如此明智。
标题:Python3 成员运算符
Python3 成员运算符
#!/usr/bin/python3 a = 10 b = 20 list = [1, 2, 3, 4, 5 ] if ( a in list ): print ("Line 1 - a is available in the given list") else: print ("Line 1 - a is not available in the given list") if ( b not in list ): print ("Line 2 - b is not available in the given list") else: print ("Line 2 - b is available in the given list") c=b/a if ( c in list ): print ("Line 3 - a is available in the given list") else: print ("Line 3 - a is not available in the given list")