---

Python Tutorial – Dictionaries, Hovercraft, Eels

[ Thanks to Brendan Scott for this link. ]

“So, a ‘dictionary’ has (key, value) pairs apparently.
What are these things? You can think of dictionaries as a
generalisation of lists. In our earlier examples we got the
contents of the lists by a number.
“The number 0 was used to store the question in the trivia list (if
you’ve forgotten it was in this tute). In that case the number 0
was the ‘key’, and the text of the question was the
‘value’.”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis