i want to use multiple functions via one outer function. the argument is a string and upon that string i want to create/pass arguments for inner functions. how is that possible?
def outer_function(arg1):
arg2 = 'random_text' + str(arg1)
arg3 = 'random_text' + str(arg1)
def inner_function(arg2,arg3):
global var
do_something ...
return inner_function()
my error i get is :
TypeError: inner_function() missing 2 required positional arguments:
inner_function(arg2, arg3)? The argument names of your inner_function as written shadow the names of those variables in your outer_function. Which means they get overwritten inside the inner_function by whatever arguments are passed when you call inner_function.def inner_function(arg2,arg3):Todef inner_function():But seriously, what the point of doing so?return inner_function(arg2, arg3)