1. Home
  2. Data Science
  3. Python
  4. Inside a function, what types do *args and **kwargs collect?

Added 2 Nov 2026

Inside a function, what types do *args and **kwargs collect?

  1. A tuple and a dictionary Correct answer
  2. A dictionary and a tuple
  3. Two separate lists
  4. A list and a set

Correct answer

A. A tuple and a dictionary

20 views

MCQSEXAM

Explanation

*args gathers extra positional arguments into a tuple, and **kwargs gathers extra keyword arguments into a dict, which lets functions accept flexible inputs.

Reference

Asked in: NTS, Python Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs