how to write if statements in one line python code example Example: python if else one line x = 'foo' if bar else 'baz'