The function foo, has a nested function; bar. Calling foo with a second set of arguments feeds them into bar if bar is returned at the end of foo. How does this work and what is it called?
Are there any uses for it over simply having a single set of arguments that calls the function normally?
def foo(arg1): print(arg1) def bar(arg2,arg3): print (arg2,arg3) return bar foo("hello")("hello","world") >>> hello hello world