Reputation: 25
Just started to learn programming.. here my question, using Python how I can write a while loop inside another while loop??
while A > 10:
B +=10
while x < 12:
x +=1
A = bla bla some function depending on B
how is the correct syntax??
Thanks a Lot!
Upvotes: 1
Views: 584
Reputation: 34146
This is a nested while inside another one. Remember to indent correctly.
while A > 10:
B += 10
while x < 12:
x += 1
A = bla bla some function depending on B
Upvotes: 5