python if assign code example Example: python if condition assignment in one line variable = value1 if condition.is_met() else value2