1is_fast = True
2car = "Ferrari" if is_fast else "Sedan"
3# with tuples (avoid):
4car = ("Sedan", "Ferrari")[is_fast]
5# ShortHand ternary
6msg = True or "Some" # True
7msg = False or "Some" # 'Some'
8output = None # -> False
9msg = output or "No data returned" # 'No data returned'
1x = 1 > 0 # (True/False)
2print(x)
3#------------------------------------------
4
5if (1 > 0): x = "something" # put any value
6print(x)