Question
Which statement about Args, Kwargs, and Parameter Kinds is the strongest interview answer?
- Args, Kwargs, and Parameter Kinds is mostly a naming style choice and has little effect on runtime behavior or design tradeoffs.
- Args, Kwargs, and Parameter Kinds exists mainly to reduce the number of files in a Python project.
- Python functions can accept positional arguments, keyword arguments, varargs, and keyword varargs to shape a callable API.
- Args, Kwargs, and Parameter Kinds matters only for frontend scripting and not for backend or automation code.
Hint
Start with the core rule behind Args, Kwargs, and Parameter Kinds.
Answer and rationale
Correct answer: C. Python functions can accept positional arguments, keyword arguments, varargs, and keyword varargs to shape a callable API.
Python functions can accept positional arguments, keyword arguments, varargs, and keyword varargs to shape a callable API. This is the base concept interviewers commonly test first.
Track: Python