Python 101 – Learning About Loops (Video)
Python 101 – Learning About Loops (Video)
In this tutorial, you will learn how to use for and while loops in Python.
Join the DZone community and get the full member experience.
Join For FreeIn this tutorial, you will learn how to use for and while loops in Python.
Specifically, you’ll learn how to:
- Create a
forloop - Loop over a string
- Loop over a dictionary
- Extract multiple values from a tuple
- Use
enumeratewith loops - Create a
whileloop - Breakout of a loop
- Use
continue - Use
elsewith loops - Nest loops
Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}