Danny wrote:
> I think I should paste some of the programs code a little more of what I
> want...
>
> var = 0
> while var <= 5:
> print a[t[var]]
> var = var +1
>
> a is a dectionary (very big) and t is a string of text. (if that's
> important right now).
>
> I'm just trying to make the value of a[t[var]] print on one line if that
> makes any sense...
if you don't want print's behaviour, you can print directly to the
stdout stream:
import sys
for var in range(5):
sys.stdout.write(a[t[var]])
write only accepts strings, so if the dictionary may contain other
stuff, you need to use the str() function to convert the data on
the way out:
for var in range(5):
sys.stdout.write(str(a[t[var]]))
</F>
--
http://mail.python.org/mailman/listinfo/python-list