I am a layman I know, but that is the only solution I have found to solve my "problem", I admit that I am not an expert like many of you who have certainly put effort into it for years. however I solved it with this method:
pt = (Wallet.pt - total_spend)
pt = str (pt)
print ("You have left:", pt, "Euro")
content = (('pt =') + pt)
content = str (content)
file_uno = open ("Wallet.py", "w")
file_uno.write (content)
file_uno.close ()
importlib.reload (Wallet)
it won't look good and it will be a horrible idea but it works smoothly.
pt = (Wallet.pt - total_spend)
pt = str (pt)
print ("You have left:", pt, "Euro")
content = (('pt =') + pt)
content = str (content)
file_uno = open ("Wallet.py", "w")
file_uno.write (content)
file_uno.close ()
importlib.reload (Wallet)
it won't look good and it will be a horrible idea but it works smoothly.