📜  python in line 条件语句 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:16.276000             🧑  作者: Mango

代码示例1
>>> age = 15
>>> print('kid' if age < 13 else 'teenager' if age < 18 else 'adult')
teenager