Parsing a large number of parms to a print statement.
benjamin.kaplan at case.edu
Thu Oct 22 23:33:43 CEST 2009
On Thu, Oct 22, 2009 at 5:16 PM, KB <keith at nekotaku.com> wrote:
> I have to pass over 150 parameters to a print statement ala:
> print "%s <text> %s <other text> %s ....<150'th unique text> %s" % (v
> , v, ... v)
> I can't use a for loop like I normally would over the list "v" due to
> the different text fragments between each var.
> Is there a lambda function I can use in place of '% (v,v...v
> )' ???
> Thanks in advance.
Why use a lambda?
"<long string with lots of params>" % tuple(v)
More information about the Python-list