one line if else python list code example Example: python if else one line x = 'foo' if bar else 'baz'