Lists, Tuples, and Nested Data Python lessons
Ordered collections, mutation, traversal, copying, matrices, and sequence reasoning.
Core concepts
Problem-solving patterns
- list · aggregate
- set · sorting
- deduplication · order
- slicing · modulo
- comprehension · stable order
What this topic builds
Learn the idea once, trace it through two verified cases, then explain why your approach works.
All 10 lessons in this topic
Work from top to bottom to build each concept gradually.
- #047Calculate list sum and averageStarterPremium
Summarize several daily sales values.
- #048Find largest and second largestStarterPremium
Report the highest and second-highest distinct contest scores.
- #049Remove list duplicates in orderBeginnerPremium
Remove repeated response codes without rearranging the first occurrences.
- #050Rotate a list to the rightBeginnerPremium
Rotate a five-person roster two positions to the right.
- #051Move zeros to the endBeginnerPremium
Move missing-value markers to the end while keeping other readings in order.
- #052Merge two sorted listsBeginnerPremium
Combine two sorted rank lists into one sorted report.
- #053Find a missing numberIntermediatePremium
Find the absent ID among a consecutive class roster.
- #054Find two-sum indexesIntermediatePremium
Find zero-based indexes of two prices that exactly use a gift voucher.
- #055Find the maximum subarray sumIntermediatePremium
Find the largest total across a consecutive streak of daily gains and losses.
- #056Transpose a matrixAdvancedPremium
Turn a 2-by-3 table into a 3-by-2 table.