RANIARANIA Academy

Data Structures — Lists, Tuples, Sets & Dictionaries

Master Python's four built-in collections — lists, tuples, sets and dictionaries — with methods, slicing, comprehensions, unpacking and set algebra. Learn which structure to reach for and why mutability matters, building the fluency the Python Institute PCAP exam expects.

Watch the free preview

Creating, indexing and slicing lists — free to watch, no account needed.

Python: Foundations INTERMEDIATE · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Build and manipulate lists using indexing, slicing, methods and list comprehensions
  • Use tuples and sequence unpacking, and explain when immutability is the right choice
  • Apply sets and set algebra to solve membership and de-duplication problems
  • Create, iterate and transform dictionaries, including dict comprehensions and nesting
  • Choose the correct data structure for a problem based on mutability, ordering and lookup needs

Syllabus

Lists — the Workhorse Sequence
Creating, indexing and slicing listsFree preview15 min
List methods and comprehensions15 min
Tuples & Mutability
Tuples and sequence unpacking15 min
Mutability, aliasing and copying15 min
Sets & Set Algebra
Sets, uniqueness and membership15 min
Set algebra — union, intersection and difference15 min
Dictionaries
Dictionaries — creation, methods and iteration15 min
Dict comprehensions, nesting and choosing a structure15 min
Lab — 10 Programming Exercises & Solutions
Programming Exercises 1–515 min
Programming Exercises 6–1015 min