list -> tuple

pyth at relax.dk pyth at relax.dk
Thu Dec 7 07:55:22 EST 2000


Hi all, I'm new... so don't hate me, if it is a stupid question  :o)

I am trying to do something like this:
how = '%2s%2s.%1s';
vals = ('ab','cd','e');
print how % vals;

Well this works fine, but I've tried to use a list... that doesn't
work... not for me anyways ;o)

My problem is, that I'm getting a list, so I have to convert it to a
tuple, before I can use it... any easy way to do that
list2tuble(list,tuple) ? :o)

Or is it possible to do the "print how % vals", with a list, somehow? :o)

Thanx :o)

Dan Larsen





More information about the Python-list mailing list