首页 > 其他分享 >基础教程-if-while-for

基础教程-if-while-for

时间:2022-12-22 11:34:27浏览次数:48  
标签:语句 greater while 基础教程 pass print

if

简写if

只有一条语句

if a > b: print("a is greater than b")

pass

if 语句不能为空,但是如果您处于某种原因写了无内容的 if 语句,请使用 pass 语句来避免错误

while

for

标签:语句,greater,while,基础教程,pass,print
From: https://www.cnblogs.com/braveman1021/p/16998010.html

相关文章