What I am trying to do is execute a function and be able to take the data of the variables that that function offers me.
Here is an example of my code:
# test.py
def display(var1,var2):
sum = var1+var2
print(sum)
# main.py
from test import *
display(1,2)
print(sum)
You can see that from the main.py
file I try to call the function to add the numbers 1+2 (that works perfectly) and print the sum result (in this I have problems). How do I get the value of that variable without printing it from test.py
?