Skip to content

Commit 091b13d

Browse files
committed
Update 11_WhileLoop.py
1 parent 346d23e commit 091b13d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

6_Loops/11_WhileLoop.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
print(fruits)
44
print(len(fruits))
55

6-
while index < len(fruits):
6+
while index < len(fruits): # while loop goes on executing until the condition inside it is satisfied
77
fruit_new = fruits[index]
88
print(index)
99
print(fruit_new)
1010
index = index + 1
11+
12+
# while True: # this is an infinite loop
13+
# print("a")

0 commit comments

Comments
 (0)