Mastering While Loops

Katy Gibson
Katy Gibson 11 Lessons 26m basics python

Master indefinite iteration using the Python “while” loop. You’ll be able to construct basic and complex while loops, interrupt loop execution with break and continue, use the else clause with a while loop, and deal with infinite loops.

The editor used in this course is Thonny: The Beginner-Friendly Python Editor. Check out our article about Thonny. It covers the setup and usage as well as best practises.

What’s Included:

Related Learning Paths:

About Katy Gibson

Katy is a full-stack web developer with experience in high school science education. She enjoys teaching and learning and is just really excited to be here.

» More about Katy

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Abdullah Dev on Feb. 27, 2020

Great work! Well done! This is so easy to follow and easy to understand! Amazing!!!

Sachin on Dec. 26, 2019

Thanks for the great tutorial. I can now use while loops to their full potential

Jean Ferreira on Sept. 4, 2019

Well done Katy. You made it very easy to understand and also you used a great tool to help us see step-by-step how everything works. Looking forward for more videos from you.

kcalhoun98 on May 21, 2019

This un-confused me about the order of operations in a nested while loop. Thank you!!

sion on May 13, 2019

Very good tutorial. It took me to places that I’ve not been before. Thank you.

estis on April 24, 2019

The tutorial was very good!

ChrisF on March 16, 2019

Great set of tutorials - Loved them!

Bill on March 13, 2019

Katy, Really well done, made while loops readily understandable. Thank you.

I changed the fizz, baz, buzz to one, two, three, just so I could more readily identify where I was and what was going on. Probably more of my dyslexia than anything else.

« Browse All Courses