Building a dictionary from a tuple of variable length

Pierre Quentel quentel.pierre at wanadoo.fr
Mon Mar 5 15:59:12 EST 2007


Hi,

> Therefore, how do I build the tuple of Falses to reflect the length of my t tuple?

Yet another solution :

d = dict(zip(t,[False]*len(t)))

Pierre




More information about the Python-list mailing list