Lesson 2 of 10

Python Lists for Data 📚

🎯 Grades 6–8 ⏱ ~25 minutes 💚 Intermediate

What You'll Learn

  • Create and index lists for data storage
  • Sort, slice, and loop through data lists
  • Use enumerate() to access both index and value
Quick Check

1. For nums = [10, 20, 30], what does nums[0] return?

A10
B20
C30

2. Which method sorts a list in place?

A.order()
B.sort()
C.arrange()

3. What does nums[-1] return?

AAn error
BThe first item
CThe last item

4. What does enumerate(my_list) provide when looping?

AOnly the values
BBoth index and value pairs
COnly the indexes