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
Unn cut off marks for jamb www. Start smma business 2024 : step by step blueprint. Harnessing the power of greenworks electric snow shovels for winter readiness.