Lists in Python

Lists in Python: Lists: Keeping Things in Order, Looping Through a List.

Updated

  1. Lists: Keeping Things in Order (Novice): A list keeps many values in order under one name, so you can read any item by its index, counting from 0 at the front or from -1 at the back, add, insert and remove items, and check whether a value is there with in.
  2. Looping Through a List (Apprentice): A for loop runs the same lines once for each item in a list, enumerate() numbers the items as it goes, sum(), min() and max() total and compare a list's numbers, and sorted() hands back a sorted copy while .sort() sorts the list itself.