Dictionary from a list

Tim Chase python.list at tim.thechases.com
Thu Aug 20 09:47:25 CEST 2009


Peter Otten wrote:
>>>> it = iter([1,2,3,4,5,6])
>>>> dict(izip(it, it))
> {1: 2, 3: 4, 5: 6}

<devo>Zip(it).  Zip(it) good.</devo>

it's-3:00am-and-i-seriously-need-to-sleep'ly yers...

-tkc






More information about the Python-list mailing list