The len() function returns the number of items in a list. For fruits = ["apple", "banana", "cherry"], len(fruits) returns 3. You need this for iteration and bounds checking.
Since indices start at , the last valid index is always len(list) - 1. An empty list has length : len([]) returns 0. The length changes as you add or remove items.
A common pattern combines len() with range() for index-based loops: for i in range(len(fruits)): iterates through all valid indices. You'll use len() constantly when working with lists. It's one of the most common operations.