Process tuple contents on the fly

Gnarlodious gnarlodious at gmail.com
Mon Apr 15 14:25:44 EDT 2013


Say I have a tuple I want to expand assigning to variables:

tup = *func()
var = tup[0]
lst.append(tup[1])

Or could I do it in one line?

var, lst.append() = *func()

So I want to append one variable to a list on the fly, is it possible?

-- Gnarlie
http://gnarlodious.com



More information about the Python-list mailing list