flâneur — a map of the web's best reading

python - convert array to dict - Stack Overflow

stackoverflow.com · 1,126 words · saved by 1 readers

I want to convert a list to a dictionary: products=[['1','product 1'],['2','product 2']] arr=[] vals={} for product in products: vals['id']=product[0] vals['name']=product arr.append(v...

python - convert array to dict - Stack Overflow New: Stack Overflow For Agents. The next generation of knowledge exchange. Learn more Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives Stack Internal Knowledge at work Bring the best of human thought and AI automation together at your work. Explore Stack Internal convert array to dict Ask Question Asked 11 years, 9 months ago Modified 11 years, 9 months ago Viewed 34k times 7 I want to convert a list to a dictionary: products=[['1','product 1'],['2'

Explore this link on the map →

saved by

related reading