Contenido del Curso
Introduction to Data Analysis in Python
Introduction to Data Analysis in Python
If/elif/else
elif
is used if the previous condition is not met, but the current one is.
price = 999 if price > 1000: print('The price is high. I won't buy it') elif price > 500: print('I will think if I need it') else: print('I will definitely buy it')
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 4