#Mastery14

For

This is a similar loop, that can be replaced for the while loop.

Steps to follow

1.-Make a string variable

2.-Follow the code: «for (variable 2) in (variable 1):»

3.-Write the action you want to do

Example:

If you want to stop just add an «if statement» an then «break»:

Now, if you want to skip a string you made add the conditional «if» and «continue» statement, example:

References:

https://www.w3schools.com/python/python_for_loops.asp

Deja un comentario

Diseña un sitio como este con WordPress.com
Comenzar