python学习之判断语句

if

用于判断数值的是否满足一定条件

if a > b:
elif a == b:
else:

判断是否为空

if a is None:
or
if not a:

for

执行循环

for a in list(start,end,steplen):

while

也是用于执行循环

while a < 10:
发布了54 篇原创文章 · 获赞 9 · 访问量 1228

猜你喜欢

转载自blog.csdn.net/qq_29983883/article/details/105388222