for example lets say I have a file called "utils.py". I have a function that passes user input through a series of "if" statements. Every time X conditions are met the original variable is altered and saved as a new variable then passed down to the next if statement. I want to access the final altered variable from a source file called "main.py". I would prefer if there was a method with no temp file. I have searched for an answer online for a while but found nothing quite as specific as what i am looking for.
to clarify i have a file called "utils"
if x == "y":
s = x.replace("blah", "blah")
print s
global I1_b
I1_b = s
then in another file called "main" i would like to call I1_b
if this == "that":
print(I1_b)