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

Explica este código Python

Dificultad: Fácil

conjunto_vacio = {}
print(type(conjunto_vacio))
Enter fullscreen mode
Exit fullscreen mode
  • A. <class 'tuple'>
  • B. <class 'dict'>
  • C. <class 'set'>
  • D. <class 'str'>

Respuesta:

👉 B. <class 'dict'>

No es posible crear conjuntos vacios usando a notación de {}, para lograr esto es necesario usar la palabra reservada set, así:

conjunto_vacio = set({})
print(type(conjunto_vacio)) # <class 'set'>
Enter fullscreen mode
Exit fullscreen mode


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
In addition to these measures, the skylink data center employs. In other words, port 9000 provides backward compatibility for users who are familiar with using portainer through that port. Chinese, indian foods.