I have lots of functions, they all edit some variable but I want each to edit the previously edited variable (by the prior function):
text = "a"
def a():
text + " hi"
print(text)
def b():
text + " there"
print(text)
def main():
a()
b()
main()
^So when running main I want this to appear:
>>a hi
>>a hi there
I've tried global but I can't seem get it working