Tags: python python programming python for beginners pythin basics python baisc python for loop for loop for loop statement programming coding python coding learn python python course loop iteration variable control flow control instruction loop control loop control variable indentation indent iteration repetition python repetition list iteration code example code lesson
A For loop statement is a basic control flow tool in Python.
In this tutorial I will show you how and why we use them in our code (hint: saves lots of time! ⌚)
We will look at a few code examples of different use cases, and we will also utilize our new knowledge of For loops by recreating lyrics of famous songs! 🎵🎵🎵
Please note, I'll be uploading new Python Basics videos by order of importance rather than a learning sequence.
I'll be organizing the videos in a special playlist and will fill in the blanks as we go 😉
If you want to see my first few Python Basics lessons (I've filmed them a very long time ago so you may notice some differences 😅)
Python Variables and Data Types :
https://youtu.be/xUhPxj8if0U
Naming Python Variables:
https://youtu.be/3YUfWCjCcko
Coding Software:
https://youtu.be/jp_3NOKHn9c
⭐ TIMESTAMPS ⭐
*******************************
00:00 - What is a For loop?
00:14 - Why use For loops?
00:42 - For Loop Syntax
02:11 - Iteration Example
03:16 - Repetition and Range
03:55 - Repetition Example
04:42 - Thanks for watching!
*******************************
In the iteration code example, I cited:
Bootylicious, Destiny's Child, Survivor, Columbia, 2001
In the repetition code example, I cited:
Smells Like Teen Spirit, Nirvana, Nevermind, DGC, 1991
A huge thank you to flat icon for the lovely icons in the slides:
https://www.flaticon.com/
Big thank you to freepik for the loop vector on the thumbnail:
https://www.freepik.com/free-vector/circular-swirls-set_9649224.htm
or
Question
Your explanation is quite clear and I think even six year old will understand. I really enjoy watching your videos. I got confused about class in Python for I am a beginner and your video just clear it out. I am really hoping to watch " Functions ", " While loop" etc. Please keep up your good work. Thank you so much for contributing your knowledge and understanding.
words = ["awesome", "entertaining", "educational"]
for x in words:
print(f'Your videos are {x}')
print("Have a wonderful day!")
I am begginer of using python, but I rather use specific name of item instead of using "i" or "item" when I iterate, for me make more sense, if I iterate list of names then name of item = name.
this is beyond any doubt the best tutorial you will ever find on youtube. for example when I was learning for loop. I was confused with "i", and I thought it is part of for loop which Mariah explained beautifully. <3
PS: Your cat-eye makeup is amazing but kept distracting me and I almost forgot why am I here hahah :-p. JK
Out of different loops, which one is your favourite?
Hello, for python it's 4 spaces not 3 or a tab. Good tutorials on your youtube channel, thanks.
03:59 When it prints the string in range 3 shouldn't it print it 4 times, since it starts counting from 0?