How does generator * / splat unpacking work?
How does generator * / splat unpacking work? Question: Let’s say I have some function f that will accept a variable number of arguments: def f(*args): for a in args: print(a) Below I call on this function three ways: Case 1: Passing in a generator expression without parenthesis: f(l for l in range(5)) >>> <generator …