Ibuprofeno.py馃拪| #100: Explica este c贸digo Python

duxtech

Cristian Fernando

Posted on May 7, 2024

Ibuprofeno.py馃拪| #100: Explica este c贸digo Python

Explica este c贸digo Python

Dificultad: F谩cil

mi_lista = [True, "hi", "bye", (1,2,3), {"1": "uno"}]
mi_lista.clear()
print(mi_lista)
Enter fullscreen mode Exit fullscreen mode

馃憠 A. ()
馃憠 B. []
馃憠 C. {}
馃憠 D. SyntaxError


Respuesta:

馃憠 B. []

La manera mas sencilla de eliminar todos los items de una lista es usando la funci贸n clear().

馃挅 馃挭 馃檯 馃毄
duxtech
Cristian Fernando

Posted on May 7, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related