here in func1(), i have some variables and there values. how can i call func1() in func2() to get all the variables and values as i want to pick rules from func2().(as we cannont use local variables in other functions) Also there is func3(), which needs func1() values. what should be the condition to get b (b>a) and pass back to func2() to pick only specific rules.
def func1():
a=1
b=2
c=3
func1()
def func2():
if a==1:
print("rule=good")
elif b==2:
print("rule=poor")
elif c==3:
print("rule=very poor")
func2()
def func3():
if b>a:
can we save func1() into a variable and pass the variable to func2() parameter? print(save) gives output=none
def func1():
a=1
b=2
c=3
save = func1()
print(save)
def func2(value):
if a==1:
print("rule=good")
elif b==2:
print("rule=poor")
elif c==3:
print("rule=very poor")
func2(save)
def func3():
if b>a:
the actual output should be: func2 gives:
rule=good
rule=poor
rule=very poor
func3 gives only:
rule=poor