2005-04-08, 22:28
hi,
if i got a list is it possible to declare a variable from the items in that list?
something like that? this doesn't work (obviously) but is there a way to do this?
tia,
cacti
if i got a list is it possible to declare a variable from the items in that list?
Quote:blob = ['var1', 'var2', 'var3']
i = 5
for listitems in blob:
i += 1
listitems = i
print var1
6
print var2
7
print var3
8
something like that? this doesn't work (obviously) but is there a way to do this?
tia,
cacti