I am looking for a more elegant alternative of multiple "if" conditions in fewer lines of code. The majority of this conditions are quite simple, as seen in the example:
if status == 'young':
i = 1
elif status == 'middle age':
i = 3
elif status == 'elder':
i = 4
elif status == 'baby':
i = 5
elif status == 'deceased':
i = 6
I would like to make something like:
if status == 'young', 'mid age', 'elder'...
i = 1, 3, 4...
Is it possible in python??