CICLO FOR EN PYTHON
Nota: La variable que utilizamos en el bucle for para ir tomando los valores puede tener cualquier nombre. Al fin y al cabo, es una variable que definimos según nuestras necesidades. Tener en cuenta que se suele usar un nombre en singular.
En el caso del for, no es posible
realizar un bucle infinito.
ROMPER UN BUCLE FOR
RECOMMENDED
USES
The for loop is
especially useful when working with data structures such as lists or tuples, as
it allows you to loop through all the elements easily. It is also useful when
you need to perform a fixed number of iterations.
ANIMATED LOOPS
Python allows you to nest
loops by putting one inside another. This can be useful for solving more
complex problems: for example, if you want to iterate some object where each
element has another iterable class such as a list of lists.
Python allows you to nest
loops by putting one inside another. This can be useful for solving more
complex problems: for example, if you want to iterate some object where each
element has another iterable class such as a list of lists.
VIDEO ON HOW TO KNOW HOW TO
USE THE FOR CYCLE
No hay comentarios.:
Publicar un comentario