--Originally published at Hackerman's house
The while loop is a function that repeats a section of the code. This section will be repeated as long as a condition is repeated.
The syntax used is:
while condition:
Section of the code that will be repeated.
The code I created is used to count from 0 seconds to 15 seconds, I also import a python library in a pretty basic way, but we will see that mastery topic in depth in another blog post. As long as the variable in the program is less than 15, the variable will be printed with a 1 second delay. When the condition no longer is fulfilled you can do that the program does something else with the ELSE function.
Here is how the actual programm works.
And this is the final result.
I hope this blog was useful for you.