I have 2 tuples which I need to combine into a dictionary. tuple 2 ( the values ) is exactly half the length of tuple 1 ( the keys )
validexts = (
'.pz3','.cr2','.pz2','.pp2','.hr2','.fc2','.hd2','.lt2','.cm2','.mt5','.mc6',
'.pzz','.crz','.p2z','.ppz','.hrz','.fcz','.hdz','.ltz','.cmz','.mz5','.mcz' )
validvalues = (
'scene','character','pose','props','hair','face','hand','light',
'camera','materials','materials )
how can I make a dictionary ( the values will be repeated for the second part of the key list ) from these 2 tuples in python ?
so far my solution has been to double the values like this
validvalues += validvalues
validdict = dict( zip( validexts, validvalues ) )
I would like to know if there is a more pythonic way.