I can\'t seem to find an elegant way to start from t and result in s.
>>>t = [\'a\',2,\'b\',3,\'c\',4]
#magic
>>>print s
Using the stream module:
>>> from stream import chop
>>> t = ['a',2,'b',3,'c',4]
>>> s = t >> chop(2) >> dict
>>> s
{'a': 2, 'c': 4, 'b': 3}
It should be noted that this module is fairly obscure and doesn't really "play by the rules" of what's typically considered politically correct Python. So if you are just learning Python, please don't go this route; stick to what's in the standard library.