You can combine iter
and zip
:
l = [u'item-01', 52, u'item-02', 22, u'item-03', 99, u'item-04', 84]
it = iter(l)
print(dict(zip(it, it)))
{u'item-04': 84, u'item-01': 52, u'item-03': 99, u'item-02': 22}
zip(it, it)
creates pairs combining every two elements, calling dict on the result uses the first element of each tuple as the key and the second as the vale.
In [16]: it = iter(l)
In [17]: l = list(zip(it,it))
In [18]: l
Out[18]: [('item-01', 52), ('item-02', 22), ('item-03', 99), ('item-04', 84)]
In [19]: dict(l)
Out[19]: {'item-01': 52, 'item-02': 22, 'item-03': 99, 'item-04': 84}
Using a for loop like your own code:
it = iter(l)
d = {}
for k, v in it:
d[k] = v