Skip to the content.

3.2 Team Teach Notes

My notes for big idea 3.2 team teach

CSP Big Idea 3.2

Introduction to Lists

Python lists are ordered, mutable collections that can hold multiple data types.

The first element in a list is an idex of 0. The last element is list length -1.

modifying lists

colors[1] = "purple" # Change element

colors.append("orange") # Add element

colors.remove("red") # Remove element

Filter Algorithms

numbers = [11, 14, 18, 23, 29, 32, 40] evens = [num for num in numbers if num % 2 == 0] # Output: [14, 18, 32, 40]