活力书本

文章
4
资源
0
加入时间
3年1月18天

python中pass语句的作用_Python pass语句及其作用

在实际开发中,有时候我们会先搭建起程序的整体逻辑结构,但是暂时不去实现某些细节,而是在这些地方加一些注释,方面以后再添加代码,请看下面的例子:age = int( input("请输入你的年龄:") )if age < 12 :print("婴幼儿")elif age >= 12 and age < 18:print("青少年")elif age >= 18 and age < 30:print(...