# while循环使用else语句 count = 0 while count < 5: print(count,"小于5") count +=1 else: print(count,"大于或等于5")
结果: