May-13-2022, 03:44 PM
(This post was last modified: May-13-2022, 03:44 PM by deanhystad.)
Using the same iterator to extract both items for each tuple is brilliant. It is not immediately obvious though. It took a minute for me to understand how it worked,
def todict(kvstring): i = iter(kvstring) return dict(zip(i, i))