Is there an until statement or loop in python? This does not work:
x = 10
list = []
until x = 0:
list.append(raw_input('Enter a word: '))
x-=1
The equivalent is a while x1 != x2 loop.
Thus, your code becomes:
x = 10
lst = [] #Note: do not use list as a variable name, it shadows the built-in
while x != 0:
lst.append(raw_input('Enter a word: '))
x-=1
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