cars = 'times'
cars == 'times'
true
if cars != 'aa':
print('cars')
&& == and
| == or
requested_toppings = ['mushrooms','onions','pineapple']
if 'mushrooms' in requested_toppings :
true
age = 19
if age >= 18:
print("You are old enough to vote!")
if age >= 18:
print("You are old")
elif age <= 19:
print("You are middle")
else:
print("You are youny")
Python学习笔记03-if语句
最新推荐文章于 2024-10-08 20:27:53 发布