I want to return a value in a script MAIN.py where the function is stated in another script? How do I do this?
In a function SUB.py I have defined:
def SUM_POWER(a,b):
c = a+b
d = a**b
return [c,d]
Now I want to get in a script MAIN.py: c and d for a=3 and b=4. I tried in MAIN.py:
import SUB
c,d = SUM_POWER(3,4)
What do I do wrong? Preferably I would want to name the variables in MAIN.py different than c,d. So for example out1, out2. out1 has to correspond to c and out2 corresponds to d by the order in which the values are returned.