Python · Beginner level

Beginner level · Module 3 of 5 · 12 guided hours

Working with Lists, Dictionaries and Strings

Store and process collections of real data, such as a price list, a class register or customer records.

Learning objectives

  • Create, update and search lists
  • Represent records with dictionaries and lists of dictionaries
  • Clean and format text with string methods

Topics

  • lists and list methods
  • dictionaries and key lookups
  • lists of dictionaries as simple records
  • string methods and slicing

Lessons

  1. Lesson 1 Lists and List Operations

    Store ordered collections and use list methods to add, remove, sort and search items.

    indexappend/remove/sortslicingmembership test

  2. Lesson 2 Dictionaries for Real Records

    Use key–value pairs to represent records such as a product with a name, price and stock level.

    key/valueget() with defaultitems()list of dictionaries

  3. Lesson 3 String Methods and Text Cleaning

    Clean and format text input, such as names typed in different cases or phone numbers with spaces.

    immutabilitystrip/split/joincase normalisationisdigit()

Practical activity

Class register tool: store learners as a list of dictionaries (name, phone, attendance), clean the text fields, and print a sorted register with totals.

Expected outcomes

  • Real records stored in a clear structure
  • Clean, consistent text ready for reporting

Assessment

Practical task marked with a checklist: correct structure, correct cleaning, correct sorted output.

Free taster lesson Data Structures: Lists, Dicts & Sets Read a free self-study lesson on this topic in the Free Course Library.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.