From db5abc629017fc46ed741ec674c25317b3a1742d Mon Sep 17 00:00:00 2001 From: Pelo Date: Sun, 20 Oct 2024 14:16:43 -0600 Subject: [PATCH] Updating for loop with zip The order of (numeros, animales) in zip(numeros, animales) was inverted. --- bucles/iterar_elementos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bucles/iterar_elementos.py b/bucles/iterar_elementos.py index 2905672..8798b77 100644 --- a/bucles/iterar_elementos.py +++ b/bucles/iterar_elementos.py @@ -12,7 +12,7 @@ #iterando dos listas del mismo tamaƱo al mismo tiempo -for numero,animal in zip(animales,numeros): +for numero,animal in zip(numeros,animales): print(f"recorriendo lista 1: {numero}") print(f"recorriendo lista 2: {animal}") @@ -37,4 +37,4 @@ print("el bucle termino" ) -#todo lo anterior funciona exactamente igual para tuplas y conjuntos \ No newline at end of file +#todo lo anterior funciona exactamente igual para tuplas y conjuntos