The Python Oracle

How can I convert a dictionary into a list of tuples?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Droplet of life

--

Chapters
00:00 Question
00:23 Accepted answer (Score 402)
00:43 Answer 2 (Score 67)
01:00 Answer 3 (Score 19)
01:29 Answer 4 (Score 10)
02:39 Thank you

--

Full question
https://stackoverflow.com/questions/6745...

Accepted answer links:
[For Python 3.6 and later]: https://stackoverflow.com/a/39980744/353...

Answer 3 links:
[Read more about list comprehensions]: http://docs.python.org/tutorial/datastru...

Answer 4 links:
[namedtuple]: http://docs.python.org/library/collectio...
[collections.OrderedDict]: http://docs.python.org/library/collectio...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #list #dictionary

#avk47