Course Home Online Lessons
Related LinksOnline DevelopmentLessonsReferenceeBooks |
DictionariesDictionaries are related to lists. They are both collections of items. List example:>>> l = [] >>> l.append('alpha') >>> l.append('gamma') >>> l.append('omega') >>> l = ['alpha', 'gamma', 'omega'] >>> l[1] 'omega' >>> l.insert(1, 'beta') >>> l ['alpha', 'beta', 'gamma', 'omega'] >>> Dictionary example:>>> d = {} >>> dict['a'] = 'alpha' >>> dict['g'] = 'gamma' >>> dict['o'] = 'omega' >>> d {'a': 'alpha', 'o': 'omega', 'g': 'gamma'} >>> d['b'] = 'beta' >>> d {'a': 'alpha', 'b': 'beta', 'o': 'omega', 'g': 'gamma'} >>>
What are dictionaries good for? This short video is a bit technical, but if you're familiar with the workings of http, you might find it interesting.
CodeAcademy LessonsWork through the following CodeAcademy lessons to further solidify your understanding: Section: LISTS & DICTIONARIES -> Python Lists and Dictionaries -> Dictionaries (10-14) Section: LISTS & DICTIONARIES -> A Day at the Supermarket Section: STUDENT BECOMES THE TEACHER (all) Section: ADVANCED TOPICS IN PYTHON -> Advanced Topics in Python -> Iteration Nation (1-3) QuizletWork through the following Quizlet until you have committed the terms to memory.
QuizTry this dictionaries quiz to test your dictionary knowledge. |
Leone Learning Systems, Inc. (LLS) is a North Shore company that provides online courses for kids anywhere and local teaching and tutoring services for students in Chicago and the Northern Suburbs of Chicagoland. LLS also provides a free geometry software package for children age 6 and up, and free resources for teachers and parents. This site includes information about classes taught, availability for tutoring, learning activities for kids, lesson plans, and ongoing software and curriculum research and development efforts. |