Robotics & Artificial Intelligence

Which keyword is used to define function with variable length arguments?

  1. *args
  2. **kwargs
  3. *var
  4. Both a and b

Python Functions

1 Like

Answer

Both a and b

Reason — Python allows functions to accept a variable number of arguments using *args and **kwargs.

Answered By

1 Like


Related Questions