感觉最后的pass并没有什么用啊,删掉后运行结果是一样的。
Topic source关于pass的用法, 我看了这个网站
http://docspy3zh.readthedocs.org/en/latest/tutorial/controlflow.html
简单的来说就是并没有什么用只是占个位置的存在。不影响程序运行
- 1
关于pass的用法, 我看了这个网站
http://docspy3zh.readthedocs.org/en/latest/tutorial/controlflow.html
简单的来说就是并没有什么用只是占个位置的存在。不影响程序运行
休电脑的
bmi = weight/(height*height) if bmi > 32: print('严重肥胖') elif bmi > 28: print('肥胖') elif bmi > 25: print('过重') elif bmi > 18.5: print('正常') else: print('过轻') pass