Reading about Python? Actually practice it. Try PyChallenge free

Python Tutorial

Loops

Python hosting: PythonAnywhere: host, run and code Python in the cloud. Free tier available.

Es posible repetir una parte del codigo con un bucle/loop. Un loop repite instrucciones en un codigo de bloqueo

Ejemplo de Python para circuito (loop): Nosotros podemos repetir una lista con un "for-loop"

#!/usr/bin/python
 
items = [ "Abby","Brenda","Cindy","Diddy" ]
 
for item in items:
    print(item)
Abby
Brenda
Cindy
Diddy

Tambien es posible repetir/contar con circuitos

#!/usr/bin/python
 
for i in range(1,10):
    print(i)
1
2
..
8
9

While-loop Un bucle completo, repite un codigo bloque hasta que una condicion sea verdadera

while engine_on:
     drive()
BackNext
Practice
Stop reading. Start writing Python.
PyChallenge gives you interactive exercises in your browser, no install needed.
Practice Python with interactive exercises