Use a list http://www.greenteapress.com/thinkpython/html/book011.html
input_list = []
while True:
ID = input('> ')
if ID == 'exit': ## "is" is different from equal
break
else:
input_list.append(ID)
print input_list
or a dictionary http://www.greenteapress.com/thinkpython/html/book012.html
number = 1 ## integers remove leading zeros automatically
input_dict = {}
while True:
key = 'A%03d' % (number)
number += 1
ID = input('> ')
if ID == 'exit':
break
## technically, else is not required as break will exit the while loop
else:
input_dict[key] = ID
print "-"*70
print input_dict
print "-"*70
for key in input_dict:
print key, "----->", input_dict[key]
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714