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
Install docker compose ubuntu. Resume preparation zytrix training. When it comes to business users, cloudystorage's affordable online storage solutions extend beyond just file storage.