use*_*945 1 python while-loop
如果我想说一些while循环,例如:while time is greater than or equal to 0,它会简单地写成while time > or == 0?或者没有办法做到这一点?
while time is greater than or equal to 0
while time > or == 0
fal*_*tru 6
使用while time >= 0(相当于while time > 0 or time == 0)
while time >= 0
while time > 0 or time == 0
>>> 0 >= 0 True >>> 1 >= 0 True >>> -1 >= 0 False
归档时间:
12 年,11 月 前
查看次数:
210 次
最近记录: