car="0"
cars="3"
if car!="3":
print("false")
age="18"
if age<"19":
print("ture")
else:
print("false")
requested_topping=["mushroom","onions","pineapple"]
if "mushroom" in requested_topping:
print("Ture")
else:
print("false")
在geany中每次结果都需要用print()函数输出结果,检查特定值的时候需要用if,else语句,而在python中自带的IDLE,不需要用if else语句检查特定值,代码段更加简单。
初学者理解。如有错误请指正。