Say I have the following loop:
i = 0
l = [0, 1, 2, 3]
while i < len(l):
if something_happens:
l.append(something)
i += 1
Will the len(i) condition being evaluated in the while loop be updated when something is appended to l?
Yes it will.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With