I have the following code
num1 = 10 someBoolValue = True
I need to set the value of num1 to 20 if someBoolV
num1
20
someBoolV
Here is what i can suggest. Use another variable to derive the if clause and assign it to num1.
Code:
num2 =20 if someBoolValue else num1 num1=num2