+ 1
Nested functions in python?
how can i use nested functions and the syntax example def outside (x): print (x) def inside(y): print (y) return inside(y) so how can i pass (y )to the second function from outside both functions ? and i know i can make another pramter in the outside function to hold y but this is not what im searching for i guess i need someone to explain the entire thing to me
1 Odpowiedź
+ 3
"so how can i pass (y )to the second function? "
From...where?
You could write "return inside(x)" but I can't tell what you want exactly.
Note that print() does not return a value so your return will produce "None"