# -*- coding:utf-8 -*- #!/usr/bin/env python3 age = int(input("age is:")) if age > 18 : print("已经成年") elif age < 12 : print("小于12岁") else: print("未成年")
python里面是根据冒号和对齐行来控制代码块的
if elif else
原文:https://www.cnblogs.com/wangzhiqiang004/p/12730105.html