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

Explica este código Python

Dificultad: Fácil

x = {"pepe", "albert", "jacinto", "alba"}
print(x[1])
Enter fullscreen mode
Exit fullscreen mode

👉 A. pepe
👉 B. albert
👉 C. jacinto
👉 D. TypeError


Respuesta:

👉 D. TypeError

Los conjuntos son una estructura de datos de Python que se caracterizan por no indexar sus elementos, por ende no es posible acceder a un valor especifico de un conjunto mediante su índice (cosa que si se puede hacer con listas y tuplas).


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
Mobile app development. Free 2025 jamb questions and answers and answers cbt / jamb 2025 answers and answers cbt. How to make passive income & earn 10,000/mo with print on demand using redbubble & free traffic.