I'm working on a project and I need to import a variable that I got in a function and use it in another one. Here's an example of what I'm trying to do.(this is not my code, just an example)
def interest(day,month,year):
interest = x #I got X by requesting a web data base.
def calc(debt,time):
result = (debt*x)/time
Is there a way to import X from one function to another?
Thanks!