Kursinhalt
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')
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 4