QuestenaPráctica que te muestra qué repasar después
Pregunta 79

Given def total(*args): return args, what does args receive in the call total(2, 3)?

  1. A list containing 2 and 3
  2. A dictionary of keyword arguments
  3. A tuple containing 2 and 3Respuesta correcta
  4. The product 6

Explicación

The starred parameter gathers unmatched positional arguments, preserving their order in a tuple. Treating args as a list or as a receiver for keyword arguments assigns it the wrong container or argument category.

Continúa con este test

Empezar la práctica
Pregunta 79: Given def total(*args): return args, what does args receive… · Python Fundamentals · Questena