Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


More on LinuxToday


Python Tutorial - Dictionaries, Hovercraft, Eels

Apr 12, 2011, 08:16 (0 Talkback[s])
(Other stories by Brendan Scott)

[ 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

Related Stories: