Learn Python • #6 Loops • How to Repeat Code Execution

preview_player
Показать описание
Loops in Python will let you run the same code over and over again.

This is useful when working with lists, or if you have something that you want to execute for a certain number of times. In this tutorial, you'll learn why loops are such an important programming concept, and how you can use them in Python.

You'll learn how to loop through every item in a list, or loop for a fixed number of times. You'll also learn how to break early out of a loop, or how to short-circuit a loop execution to "continue" to the next iteration of a loop.

This video is part of a beginner tutorial series for anyone who wants to learn Python from scratch, and get to a point where you can start coding your own projects.

🔗 Next Chapter: Coming Tomorrow!
👉 Follow me on Twitter: @pixegami

📚 Chapters
00:00 - Introduction to Loops in Python
00:40 - Using "for" Loops
04:00 - Using enumerate()
04:58 - Looping X Times ("for in range")
07:13 - Using "while Loops
09:00 - How to "break" a loop
10:53 - How to "continue" a loop
13:17 - List Comprehensions
15:00 - Coding Exercise: Loops
Рекомендации по теме
Комментарии
Автор

i think loops is the most confusing but you've made it easier compared to other clips i have watched

neroetal