DEV Community

Cristian Fernando
Cristian Fernando

Posted on • Edited on

1

Ibuprofeno.py💊| #33: Explica este código Python

Explica este código Python

Dificultad: Básico

## Reto #33
def fn(**x):
  return type(x)

print(fn())

Enter fullscreen mode Exit fullscreen mode
  • A. <class 'list'>
  • B. <class 'set'>
  • C. <class 'dict'>
  • D. <class 'tuple'>

Respuesta en el primer comentario.

Top comments (1)

Collapse
 
duxtech profile image
Cristian Fernando

Respuesta:

  • C. <class 'dict'>

Cuando el parámetro de una función tenga la sintaxis de ** significa que se trata de un **kwargs, un parámetro especial de las funciones de Python que transforma de manera automática al parámetro en un diccionario.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more