[Tutor] Treating lists as lists

Dave Angel d at davea.name
Wed Nov 30 02:22:58 CET 2011

On 11/29/2011 08:09 PM, Mark Lybrand wrote:
> I am pretty sure I saw this somewhere but now I can't.  Here's the problem:
> list = ['hello', 'world']
> template = '%s %s'
> print template % list
> But it appears that list is just one (list) when I want to treat it as two
> (items).  I can do that right?  How, pretty please?
> Mark

print template % tuple(list)



More information about the Tutor mailing list