Given the following function:
def foo(a, b, c): pass
How would one obtain a list/tuple/dict/etc of the arguments passed in, wit
You can use the inspect module:
def foo(x): return x inspect.getargspec(foo) Out[23]: ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
This is a duplicate of this and this.