Learn / Python / Lists and Tuples

Beginner 16 min

Lists and Tuples

Ordered sequences — mutable lists vs immutable tuples.

What you will learn

  • Create and slice lists
  • Use list methods append/pop
  • Know when tuples beat lists
python
nums = [10, 20, 30]
nums.append(40)
print(nums[1:3])

point = (3, 4)
print(point[0])

Try it yourself

Given scores = [88, 92, 75, 95], print the highest score without using max().