Wrap up

Summary

  • Lists store multiple pieces of data, like [1, "hello", [ "another list" ], False]
  • You access list elements by their index, which starts at 0, like my_list[0]
  • You can change list contents by assigning at an index, appending, or removing elements
    • assigning: my_list[0] = 5
    • appending my_list.append(10)
    • removing my_list.pop(2)
  • You can solve many problems by updating a variable at each step in a loop
    • total and average
    • maximum and minimum
    • finding and filtering

How was this lesson?