If I define a function 1 which takes as input a variable number of lists and provide as output one list as follows:
def function1(*args):
size = len(args)
output = []
for k in range(size):
do_something
output.append(...)
return output
and then a second function which also takes as input a variable number of lists (and return one list), which calls the first function as follows:
def function2(*args):
size = len(args)
output = []
for k in range(size):
for index, line in enumerate(function1(args[k])):
do_something
return output
When I use the second function I got an error unless I define the 5th line of the code like this:
for index, line in enumerate(function1(*args[k])):
My question is, should I also declare that the input number is undefined also when I call the function from another functin?