题解 | #条件比较#
条件比较
http://www.nowcoder.com/practice/fbfcce672f1f4060998f018ad119dc6f
NP6 条件比较
思路:
step1:对应输出即可;
代码如下:
print(2==3)
print(2!=3)
print(2>3)
print(2<3)
print(2>=3)
print(2<=3)
print(2<3 and 2<1)
print(2<3 or 2<1)
print('Python'=='Python')
print('Python2'!='Python3')
print('PYTHON'.lower() == 'Python'.lower())
my_list = [1,2,3]
print('2 is in my_list!')
print('8 is not in my_list!')