x = 'foo' if bar else 'baz'
if [condition]: [one line of code when condition true]
if x == 0: print("Condition passed")
b.append(a) if a is not None else None
var = [exp] if [condition] else None
[ x if x%2 else x*100 for x in range(1, 10) ]
x = 1 > 0 # (True/False)
print(x)
#------------------------------------------
if (1 > 0): x = "something" # put any value
print(x)
>>> myList = []
>>> False and myList.append('myString')
False
>>> myList
[]
>>> True and myList.append('myString')
>>> myList
['myString']
[what to do when condition=true] if [condition] else [what to do when condition=false]