基本语法:
if 判断条件: 条件成立要做的事
通过缩进判断层级
案例:
age = 18 if age >= 18: print("成年了") print("唉,时间真快")
Last updated 2 years ago
Was this helpful?