how to write if statement in one row code example Example: python oneline if statement var = [expression1] if [condition] else [expression2]