Answers for "python in line conditional statement"

1

python in line conditional statement

>>> age = 15
>>> print('kid' if age < 13 else 'teenager' if age < 18 else 'adult')
teenager
Posted by: Guest on August-17-2021

Code answers related to "python in line conditional statement"

Python Answers by Framework

Browse Popular Code Answers by Language