一、判断语句Python 条件语句是通过一条或多条语句的执行结果(True 或者 False)来决定执行的代码块。可以通过下图来简单了解条件语句的执行过程:举例:#演示红绿灯 #绿灯代表通行,红灯代表不能通行,黄灯减慢速度 color="green" if color=="green": print("可以通行") if color=="red": print("不可以通行") if colo
转载 2023-08-09 16:31:29
647阅读