Nested Python Loops Explained ** DAY 23** Python Mastery

preview_player
Показать описание
Using loops in computer programming allows us to automate and repeat similar tasks multiple times. In this tutorial, we’ll be covering Python’s for loop.

A for loop implements the repeated execution of code based on a loop counter or loop variable. This means that for loops are used most often when the number of iterations is known before entering the loop, unlike while loops which are conditionally based.

For Loops
In Python, for loops are constructed like so:

for [iterating variable] in [sequence]:
[do something]
The something that is being done will be executed until the sequence is over.

This video shows a cool implementation of nested looping (a loop in a loop) and one that uses some great code when just starting.
Рекомендации по теме
Комментарии
Автор

The penny finally dropped. A world of thanks. The drawing really helped me understand how it all works. Simply brilliant. I am grateful for this lovely video and clear explanation. Hats off to you!

ijeffking
Автор

Thanks for thia great series of episodes! Ita realy helpfull for a totall beginner. Do you have a course? Also, Where are the rest of the days, to 100?

DaLostStar
Автор

you are wonderful! Would love to take a full course on python taught by you. cheers!!

kosenotes
Автор

Hi Grant! I'm not sure where to ask general questions so I'll just hit you up here. It seems like pycharm rolls out new versions very frequently... 2 - 4 times per month. Do you install all of these? Once a month? I'm curious your thoughts on how crucial they are... I'd rather spend my time learning/coding but if they are necessary, I am happy to do it. Thanks!

caseymeehan