If Statements in Python
If Statement
Else Statement
Shorthand If (Inline If Expression)
If you only have one single line of code to run after your condition, you can put it all on one line to keep your code clean and compact. This is often used for very simple checks where a full block of code would feel like overkill for the reader.
