check if else in one line in python code example Example: one line if statement python var = [expression1] if [condition] else [expression2]