Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I make a loop that changes?
#1
How do I make something like

Code:
x = 5
while 0 < x
    b  = raw_input("something: ")

However each time it loops, I want it to change, like:
first loop - b = raw_input("something: ")
second loops - c = raw_input("something: ")
third loop - d = raw_input("something: ")
and so on.
Reply
#2
Code:
List = []
for x in xrange(5): List.append(raw_input(""))
[Image: nv70ad.png]
Terrorcore, unleash, extermination
Hyper real, cold blood, determination
fudge them, I like this sensation
Incredible, I from the annihilation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)