Search code examples
pythonfunctionargumentsargument-passing

How do I print out which arguments a Python function requires/allows?


Suppose I have a function and I want to print out the arguments it accepts. How can I do this?


Solution

  • Use inspect.getargspec() to find out.