# for loops = execute a block of code a fixed number of times. # You can iterate over a range, string, sequence, etc. # ---------------- EXAMPLE 1 ---------------- for x in range(1, 11): print(x) # ---------------- EXAMPLE 2 ---------------- for x in reversed(range(1, 11)): print(x) print("Happy New Year!") # ---------------- EXAMPLE 3 ---------------- for x in range(1, 11, 2): print(x) # ---------------- EXAMPLE 4 ---------------- credit_card = "1234-5678-9012-3456" for x in credit_card: print(x) # ---------------- CONTINUE ---------------- for x in range(1, 21): if x == 13: continue else: print(x) # ---------------- BREAK ---------------- for x in range(1, 21): if x == 13: break else: print(x)
@doober.432 жыл бұрын
hi
@relentlesshvh2 жыл бұрын
Hey bro, I don’t know if you would have the time to do this. But PLEASE could you do a lua guide from scratch. There are barley any tutorials on YT. And none of them are very good. All I ask is just for around an hour course. But more would be a bonus
@ShivamKumar-rz7uv Жыл бұрын
bro code -- range star pattern !!!!
@AmnaRajnaz6 ай бұрын
Yes..scratch would be helpful!🙏😿
@AdityaPandya-l6n4 ай бұрын
Thanks from india bro
@godofyoshy26 күн бұрын
bro is the absolute goat. teaches people python for absolutely free refuses to take donations instead gives donations to St. Jude. this person is absolutely worth protecting.
@Draurore Жыл бұрын
i just need to say thank you, i have a programming exam tomorrow and your videos are saving my life
@IamNotVenomousАй бұрын
same
@kannonrhodes624Ай бұрын
same
@sevvalkanberoglu990924 күн бұрын
same
@Zenoffx-fb9wg23 күн бұрын
Same
@Rotta-_-2 күн бұрын
same
@grey88544 ай бұрын
Finally! Someone who gets straight to the point!
@Nk_Lifestyle1 Жыл бұрын
Welp that made my understanding more clearer, at first I was on a course learning for loops and implementing it Into real situations like a website or software and I was confused but once I saw this it made the understanding of it easier thank you
@stanislawignacy Жыл бұрын
bro that's even better than yout 12-hour tutorial piece. I had a small doubts how range can be iterated but now I understand it!
@김두현-s8p4 ай бұрын
Thank you! Im taking python course by myself but 100 day python instructor didnt explain well. This makes me understand superbly well!
@En1gma2u Жыл бұрын
Best explanation and easy to understand. Thank you!!
@samiscales3 күн бұрын
he just explained to me in 5 minutes what my professor couldn’t in a week
@Qtaro-oh2 жыл бұрын
You got me into programming
@droneit79618 ай бұрын
are you still in programming?
@Qtaro-oh8 ай бұрын
@@droneit7961 i still am but i stopped for months because i have a final exam and i’ll finally graduate ;))
@Iamtwohundredtwentyfive6 ай бұрын
Im also wondering, still grinding?
@Qtaro-oh6 ай бұрын
I don’t know if this is considered programming but after a very long while of learning python and c++ i recently decided to start developing a roblox game in Lua (which im doing at this very moment while typing this reply)
@Buri0zaemon6 ай бұрын
@@Qtaro-oh you learning loops logic and developed a game?
@刌 Жыл бұрын
Can you guys imagine this legend made me master in python, and in school, students of my grade are just learning simple things of python
@fustt2426 Жыл бұрын
great
@刌2 ай бұрын
@@fustt2426 didn't expected my comment lol
@Animefan80509 ай бұрын
One of the best tutorials I've seen. I am learning Godot (whose programming language is extremely similar to Python) and this has cleared up a lot! Will subscribe for more. You explained in a way many dont. What's the function? How can you use the function? What's a practical example? You did all of that, nicely done.
@juancastrillon301120 күн бұрын
Thank you brother, a very good video
@ZenZangetsu10 ай бұрын
This stuff was confusing in my course and in my book. This really helped clear up some confusion. Thanks man!
@julialouise9695 ай бұрын
Thank u so much for this video. I was having trouble for understanding this function with my professor's videos. You explained it so well.
@karnikkumarsingh10 ай бұрын
I was first confused at coding but ur explanation is marvelous i like how you teach programming
@Hamyto416646 ай бұрын
bro's a gigachad, physically and mentally
@minterdaly12653 ай бұрын
You explain everything in such an easy to understand way
@JamalDid Жыл бұрын
Keep up the good work! You helped me out and now i understand more and better! Thank you
@SukreLopezBeats10 ай бұрын
High quality content. You win me as a subscriber.
@mira_kurniawati569014 күн бұрын
Very clear explanation. Thanks for your help
@farhanbinsufian7233 Жыл бұрын
His videos forces me to think why people even buy paid course. It isn't even like he doesn't incorporate other misc. important stuff aswell. Keep going on Bro!
@adamartinmusic11 ай бұрын
thank you so much for helping. i understand you so well.
@Jggapp0162 жыл бұрын
This episode is really interesting, keep it up!
@holiveirajr1Ай бұрын
Great tutorial! Very useful info.
@nkay_022 ай бұрын
These videos are good to enhance understanding after reading the theory
@fastrobreetus7 ай бұрын
You are an excellent instructor!
@denissemaya4752 ай бұрын
thank you for getting straight to the point!
@jespero944 ай бұрын
Really big thanks for your videos. Subbed! Trying to learn python and its not easy when our techer is not the best ;)
@sameerjain91742 жыл бұрын
Bro you are the best guy for programming
@AyanikaGhoshDastidar5 ай бұрын
i might actually pass my practical tmrw tysm for this vid
@GVSdude208 ай бұрын
bro you helped me with my coding project with this tutorial! Thankyou
@buffoonoutdoors3 ай бұрын
print ("Thank you")
@ToniMam426 ай бұрын
Thank you, that was such a straight forward explanation.
@Bosy99616 Жыл бұрын
bro, you're my hero
@lamaXDАй бұрын
Ur the best
@jorgegalvis5544 ай бұрын
This way to explain it's really nice
@IamNotVenomousАй бұрын
eeethank you so much you are asigma gigachad without you imma fail my exams
@edwardh79857 ай бұрын
great video
@GTV_367 Жыл бұрын
Good vids bro🤞🏽
@FahimMalikOfficial5 ай бұрын
have a sub bro, appreciate your free education and very easy to learn video!
@morpheus_circuit Жыл бұрын
Once again great tutorial Bro Code
@Kratosin2.03 ай бұрын
Thanks! Short and helpful!
@rebeccabreez8928 Жыл бұрын
i your videos just clear all my doughts . arigato gozaimasu !!
@niknam.3444 ай бұрын
Nice and useful, tnx❤
@matihanan32812 ай бұрын
THANK YOUUUU!
@Dev_bhog Жыл бұрын
thank you i had watched alot of videos and couldnt understand, yet i understand now good day.
@AkshayKp-wz5dg4 ай бұрын
Love from India ❤
@HsuMonMonThant Жыл бұрын
Thank u so much bro Congratulation for 1M subscribers🥳
@shaminasudheer62852 ай бұрын
People who is watching in 2024
@YoussefAhmed-bb9qs2 ай бұрын
Me bro
@hayatiayhan15242 ай бұрын
@@YoussefAhmed-bb9qsSame Bro
@lucaschen899224 күн бұрын
2025
@Tiyaahhhh19 күн бұрын
2025
@JihadHossen-wh7hw17 күн бұрын
25
@varshinisekhar4857 Жыл бұрын
you are awesome 🤩
@rhinosorusАй бұрын
It's literally january 2025. Your happy new year wish matched lol
@ShayanGGYT27 күн бұрын
xD
@kspivey884 ай бұрын
nicely explained! thanks!
@Tettzz7 ай бұрын
Just started coding, see you in a few years!
@Buri0zaemon6 ай бұрын
Really helpful!
@mythicpulse-i9o Жыл бұрын
what a nice video
@jwl796 Жыл бұрын
nice course❤
@mo-ab7315 Жыл бұрын
tutorials are so goated
@WINDOWSUSER-q4s Жыл бұрын
NICELY DONE...❤
@n8an8113 ай бұрын
Thanks!
@edikblank3759 Жыл бұрын
biggest gigachad because: A) Amazing tutorial B) Said tutorial is absolutely free C) Flat out refuses donations and says no give to a charity D) Has the gigachad picture in his pfp
@sunlightlord124 ай бұрын
Thank You!
@ghusandgamin2 жыл бұрын
That was helpful Thanks 🙏🙏
@Rawman_56 Жыл бұрын
You are awesome
@FundamSrijan25 күн бұрын
The missing colon in thumbnail of a coding video 😭😭😭
@DRACULACollection11 ай бұрын
love u bro u make me to understand ❤❤❤❤
@TajikTungi-ot5ru11 күн бұрын
print("best in the game: no cap")
@rajakm7544 Жыл бұрын
very useful
@tara233711 ай бұрын
you rock Bro!
@blucky9832 жыл бұрын
Thanks bro
@joncaldwell47536 ай бұрын
Good "for" you
@abdulwahidhamidy6909 Жыл бұрын
Thanks
@pedicle5509 Жыл бұрын
Thank you :)
@abdulhannan-18 Жыл бұрын
break: breaks the loop at that iteration for x in range(1, 21): if x == 18: break print(x, end=' ') 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 for x in range(20): if x == 18: break print(x, end=' ') 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
@Cruzfire10 Жыл бұрын
Thank you Benson Adventure Time!
@SavageScientist2 жыл бұрын
great examples
@GaryChike9 ай бұрын
Slightly easier way to loop in reverse: `for x in range(10,1,-1):` = `for x in reversed(range1,11)):`
@moniquebrasilbaptista1989 Жыл бұрын
Thank you
@pjm3005 Жыл бұрын
i'm pretty sure the for loop executes faster than the while loop too.
@gbzedaii37656 ай бұрын
#while loops = Used to execute loops infinite amount of times. #for loops = used to execute loops a fixed number of times.
@Ggxzstbccgbnjgcx5 ай бұрын
1:47 thanks today is my birthday 🥳
@dennisderekas40054 ай бұрын
question:at 4:22 you have written ''else:'' wich i tried not to write it and see what happens.Nothing changed,so why did you write it (i am asking because of curiosity)
@bigfly41679 ай бұрын
What extension pack are you using to get you VS code layout to look like that?
@MegaKrendelek4 ай бұрын
hi! can you please tell how to use for i in range (a, b) and write all decimals between a and b please. I don't understand cause a and b can be only integer, how can i write all decimals (that is a float) between a and b? Thank you !
@ramial_rashid444011 ай бұрын
thx
@Trivenikandru2217 ай бұрын
👏
@jenis-012 жыл бұрын
can you please make data structure algorithm course for C++? Please!!!!
@vividdaydream151610 ай бұрын
Okay, so a "for" loop is sort of a countdown or timer?
@MassMen8 ай бұрын
Can you tell me how you have two screens
@DIYRobotGirl Жыл бұрын
But can we do that is a set of arrays with timer or wait time in millis and make the different arrays do different things from one another? 😮
@PraviLukijanJC7 ай бұрын
thanks for distracting me from ninjago overture theme that has been stuck in my head for hours. i am a c++ programmer but i want to learn python so i know complicated languages.
@javierchavarria1386 Жыл бұрын
what IDE are you using?
@BallzRolls Жыл бұрын
its pycharm
@leongriggs3602Ай бұрын
I feel a right numb nuts asking... but what does the X represent?
@elbibokoning7889Ай бұрын
Every element inside the variable
@ChewwyPew Жыл бұрын
So if we want to use for loop on a list, do we turn the list into strings with .str() after the list
@Lithium50 Жыл бұрын
To turn a list into a string you use: newString = "".join(your_list)
@Ndujlz Жыл бұрын
yes just go like this cars = ("Mercedes", "Audi", "BMW") for car in cars: print(car)
@yunishmanandhar4817 Жыл бұрын
hey whats an itiration i need some simple definiton
@gokusatan-f7pАй бұрын
how can i download your type of python
@koga-roblox228027 күн бұрын
PyCharm
@vaibhavmalhotra48559 ай бұрын
""" Here I have added while loop in the nested for loops So if the user type a letter or a number, it will ask you to type a symbol instead Yes I have changed the variable from rows and columns to length and breadth respectively to relate this code more to Math """ #Print a rectangle using symbols print("Rectangle using symbols") length = int(input("Enter number of symbols you want horizontally: ")) breadth = int(input("Enter the number of symbols you want vertically: ")) symbol = str(input("Enter the symbol: ")) for x in range(breadth): for y in range(length): while symbol.isalpha() or symbol.isdigit(): # While condition if the user type any letter or number then the loop will run symbol = str(input("Enter the symbol not a letter from alphabet or a number: ")) print(symbol, end="") print()
@rayforever2 жыл бұрын
MERN app development? I am having trouble with npm cuz they loads too much files Can you make course on how to set up mern app development
@Reymax1646 ай бұрын
Coming from Java, Python is heck confusing for me. I understand other C based languages such as C# and C++ better 😅
@Reymax1646 ай бұрын
Tbf, Java, C# and C++ are like the children of C so Python will feel alot different 🤔 Can't jump into OOP right away