Is there a way I can return a list of lists without explicitly accessing the list by index? I would like to just return something like return *result. How can I do that in python?
def func():
result = [[1,2],[3,4]]
return result[0], result[1] # I want to return *result
print(func)
EDIT: I can't just return the result because I need to return each element, not the whole list as there are constraints. Also I wouldn't know how big the results are. so it could be up to return[100]