Loop
while
Runs as long as condition is true
.
i = 1 while i < 6: print(i) i += 1
next
Function used to retrieve next item from the iterator.
mylist = iter(["apple", "banana", "cherry"]) x = next(mylist) # x = apple x = next(mylist) # x = banana x = next(mylist) # x = cherry