pyPython Practice LabFrom first print to final round
TOPIC 07 OF 18

Lists, Tuples, and Nested Data Python lessons

Ordered collections, mutation, traversal, copying, matrices, and sequence reasoning.

10 exercises8+ conceptsBeginner → interview context
Start this topic
WHAT YOU WILL LEARN

Core concepts

Calculate list sum and averageFind largest and second largestRemove list duplicates in orderRotate a list to the rightMove zeros to the endMerge two sorted listsFind a missing numberFind two-sum indexes
REUSABLE THINKING

Problem-solving patterns

  • list · aggregate
  • set · sorting
  • deduplication · order
  • slicing · modulo
  • comprehension · stable order
LESSON OUTCOME

What this topic builds

Learn the idea once, trace it through two verified cases, then explain why your approach works.

ORDERED LESSONS

All 10 lessons in this topic

Work from top to bottom to build each concept gradually.

  1. #047
    Calculate list sum and average

    Summarize several daily sales values.

    StarterPremium
  2. #048
    Find largest and second largest

    Report the highest and second-highest distinct contest scores.

    StarterPremium
  3. #049
    Remove list duplicates in order

    Remove repeated response codes without rearranging the first occurrences.

    BeginnerPremium
  4. #050
    Rotate a list to the right

    Rotate a five-person roster two positions to the right.

    BeginnerPremium
  5. #051
    Move zeros to the end

    Move missing-value markers to the end while keeping other readings in order.

    BeginnerPremium
  6. #052
    Merge two sorted lists

    Combine two sorted rank lists into one sorted report.

    BeginnerPremium
  7. #053
    Find a missing number

    Find the absent ID among a consecutive class roster.

    IntermediatePremium
  8. #054
    Find two-sum indexes

    Find zero-based indexes of two prices that exactly use a gift voucher.

    IntermediatePremium
  9. #055
    Find the maximum subarray sum

    Find the largest total across a consecutive streak of daily gains and losses.

    IntermediatePremium
  10. #056
    Transpose a matrix

    Turn a 2-by-3 table into a 3-by-2 table.

    AdvancedPremium