DEV Community

Cover image for Ibuprofeno.py💊| #120: Explica este código Python
Cristian Fernando
Cristian Fernando

Posted on • Edited on

2

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).

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay