I edited my thread based on feedback. Basically, I need to use a couple of variables from function 1, and I need to print it in function 2.
How do I go about doing that?
Shawn's answer is great, very straight-forward and almost certainly what you are looking for. He suggests you bring the variables out of the function_one scope by returning them. Another way to solve the problem is to bring your function_two into function_one's scope with a closure.
def function_one():
num_one = 5
num_two = 6
num_three = 7
def function_two():
print(num_one)
print(num_two)
print(num_three)
return function_two
func_two = function_one()
func_two()
Edit to address your comment. You could also call function_two directly like this. But this is less readable and unpythonic IMO.
function_one()()