Ternary operators are offered in most programming languages, and are great for simple conditionals. Now you might ask:
Does Python have a ternary operator?
The answer is yes:
age = 19 // Ternary operator message = "User is of age" if age > 18 else "User is under age" print(message)