Questenaتمرینی که نشان می‌دهد بعد چه چیزی را مرور کنید
سؤال 80

Given def total(**kwargs): return kwargs, what does kwargs receive in the call total(a=1, b=2)?

  1. A tuple containing 1 and 2
  2. A list containing the names a and b
  3. A tuple containing the names only
  4. A dictionary mapping a to 1 and b to 2پاسخ درست

توضیح

The double-starred parameter gathers unmatched named arguments into a dictionary that retains both keyword names and their values. It does not discard the names or collect these arguments into a positional tuple.

ادامهٔ این آزمون

شروع تمرین
سؤال 80: Given def total(**kwargs): return kwargs, what does kwargs… · Python Fundamentals · Questena