The len() function is a built-in function in Python, meaning it's readily available without needing to import any external modules. Its primary purpose is to return the number of items in an object.