PyPython Lab

Stage 2 · 30 minutes · Pro

Dictionaries (dict) and sets

Store data by key with dict, count frequencies, loop over items(), get(); remove duplicates with set.

Objectives

Lesson for Pro members

Phone contacts, scores by name, counting how often a word appears: 'key → value' data is everywhere. dict is the most used structure in real Python.

View Pro plans Open in the app