Course Content
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')
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 4