in ,

🧑🏻‍💻 TechAcademy | How to escape from Python's infinite loop [For beginners]

How to escape from Python's infinite loop [for beginners]

Learn how to get out of Python's infinite loop.

If you're not familiar with Python in the first place, read an article that explains what Python is and get a better understanding.

 

This article is based on the contents of the TechAcademy online boot camp Python course.

 

 

What is an infinite loop?

In Python, you can write iterations with the for or while instructions.A process that does not end forever is called an infinite loop.The following is an example of an infinite loop.

while True: print ("hello")

When I run this program, the while condition is always "True", so hello forever ...

→See more in Tech Tech Magazine