Skip to main content
MahiDev — Learn. Build. Become AI-ready.

Module 08

Collections Deep Dive

Learn Python collection types deeply: list, tuple, set, frozenset, dictionary, and mixed combinations.

Intermediate6 hours 8 min15 lessons

01

Collections Deep Dive — Overview

Choose the right Python collection: list, tuple, set, frozenset, or dict. Compare order, duplicates, mutability, and indexing in one roadmap.

Intermediate30 min

02

List Methods — append(), insert(), remove(), pop(), clear()

Master Python list mutation methods: append and insert at any index, remove by value, pop by index, and clear all elements in place.

Intermediate28 min

03

List Methods — index(), count(), enumerate(), extend()

Search Python lists with index() and count(), iterate with enumerate(), and merge lists using extend() or the + operator.

Intermediate25 min

04

List Methods — sort(), reverse(), copy(), and del

Sort and reverse Python lists in place, copy safely with copy() vs aliasing, and delete elements with the del statement.

Intermediate28 min

05

Nested Lists, 2D Lists, and Matrices

Work with inner lists, multi-level indexing and slicing, matrix rows, nested loops, combining 2D lists, and shallow copy pitfalls.

Intermediate25 min

06

Tuple Deep Dive — Immutable Sequences

Create Python tuples safely, avoid the single-element trap, convert from lists and strings, unpack coordinates, and know when tuples beat lists.

Intermediate22 min

07

Tuple Methods — index(), count(), and sorted()

Use the only two tuple methods, understand what tuples cannot do, and sort tuple data with built-in sorted() without mutating the original.

Intermediate20 min

08

Set Basics — Uniqueness, Creation, and Limitations

Create Python sets from lists and strings, remove duplicates, use membership checks, and learn why sets have no indexing.

Intermediate22 min

09

Set Methods — add(), remove(), discard(), pop(), update()

Mutate Python sets safely: add elements, remove with remove() vs discard(), pop arbitrary items, merge with update(), clear, and copy.

Intermediate25 min

10

Set Algebra — union(), intersection(), difference(), and more

Master Python set algebra with methods and operators: union, intersection, difference, symmetric difference, and subset relationships.

Intermediate30 min

11

Frozenset — Immutable Sets and Read-Only Algebra

Create immutable sets, perform read-only set algebra, and understand when frozenset is required for dictionary keys and nested sets.

Intermediate25 min

12

Dictionary Methods — get(), keys(), values(), items(), update()

Access and mutate Python dictionaries safely using get(), iterate with keys/values/items, merge with update(), and remove with pop() and popitem().

Intermediate28 min

13

Nested Dictionaries and Collection Combinations

Model real-world records using nested dictionaries and combine dictionaries with lists, tuples, and sets safely.

Intermediate28 min

14

Hashability Rules and Collection Conversions

Learn which Python objects can become dictionary keys or set elements, fix TypeError unhashable type, and master conversions between list, tuple, set, and dict.

Intermediate25 min

15

Collections Practice — Interview Programs

Final revision covering list, tuple, set, frozenset, and dictionary with interview-style coding problems.

Intermediate30 min