Re: [Tutor] Unzipping a list

2008-07-08 Thread Faheem
Hey all, If anyone is interested I found this while googling answers= ['ask'.'tell','repeat','sell'] def unzip(answers): unzipped = "".join(answers) # if all items are strings unzipped = ", ".join(map(str, answers)) unzipped = " ".join(str(v) for v in answers if v > 0) return unzipped

[Tutor] Unzipping a list

2008-07-07 Thread Faheem
hey all, How can i pass the elements of a list in the follwoing manner? L =['ask'.'tell','repeat','sell'] To illustrate my question: how can i pass the above list as follows "/some/program/run -o ask tell repeat sell" thanks in advance ___ Tut

Re: [Tutor] String Replacement question

2008-05-22 Thread Faheem
Hey All, Thanks.. That was quick. Good to know there is a mailing list like this one. Thanks to everyone and all the replies. Faheem ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] String Replacement question

2008-05-21 Thread Faheem
thing more concise? thanks in advance, Faheem ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor