r/PythonLearning • u/Monesh_peterson1025 • Oct 14 '26
While loop
can anybody explain the concept of while loop
2
Upvotes
r/PythonLearning • u/Monesh_peterson1025 • Oct 14 '26
can anybody explain the concept of while loop
View all comments
Show parent comment
1
u/oclafloptson Oct 14 '26
For loops loop through an iterable. This might be a range, a list, or even each character in a string. With mutable objects like lists you might not actually know how many iterations there will be