This content originally appeared on DEV Community and was authored by Cristian Fernando
Explica este código Python
Dificultad: Fácil
print(set(("ADENINA", "TIMINA", "TIMINA", "GUANINA", "ADENINA", "CITOSINA")))
-
A.
{'ADENINA', 'TIMINA', 'GUANINA'}
-
B.
{'CITOSINA', 'ADENINA', 'GUANINA'}
-
C.
{'CITOSINA', 'ADENINA', 'TIMINA', 'GUANINA'}
-
D.
Ninguna de las anteriores
Respuesta:
👉 C. {'CITOSINA', 'ADENINA', 'TIMINA', 'GUANINA'}
¿Qué sucede si le pasamos a la función set
una tupla?
Nuevamente elimina todos los items repetidos y regresa un set
con lo valores únicos.
This content originally appeared on DEV Community and was authored by Cristian Fernando

Cristian Fernando | Sciencx (2024-06-26T11:00:00+00:00) Ibuprofeno.py💊| #125: Explica este código Python. Retrieved from https://www.scien.cx/2024/06/26/ibuprofeno-py%f0%9f%92%8a-125-explica-este-codigo-python/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.