DEV Community

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

Posted on

3

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

Explica este código Python

Dificultad: Fácil

x = {"a", "b", "c"}
print("c" in x)
Enter fullscreen mode Exit fullscreen mode
  • A. True
  • B. False
  • C. NameError
  • D. SyntaxError

Respuesta:

👉 A. True

Podemos usar el operador in para verificar si un valor pertenece o no a un conjunto.

En nuestro ejemplo c si esta en el conjunto x, entonces regresamos True.

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