For Loop
We use loops if we want to repeat any action n-times.
1234prices = [100, 458, 231, 378] for i in prices: print(i, end = '')
12345# Decreasing prices by 1 prices = [3, 5, 6, 2, 7, 8] for i in prices: print(i, end = ' ')
end = ' '
means that the result will be written in one row (not column).
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 7
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 2.7
For Loop
Desliza para mostrar el menú
We use loops if we want to repeat any action n-times.
1234prices = [100, 458, 231, 378] for i in prices: print(i, end = '')
12345# Decreasing prices by 1 prices = [3, 5, 6, 2, 7, 8] for i in prices: print(i, end = ' ')
end = ' '
means that the result will be written in one row (not column).
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 7