Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
List Length | List
course content

Contenido del Curso

Python Data Structures

List LengthList Length

When dealing with a sizable list, you might want to know the number of items it contains. You can determine this using the len() function, which returns the count of elements in the list. Let's dive into how it operates!

Note

A nested list is considered a single item. The len() function doesn't count the individual items inside a nested list as separate items of the main list.

Tarea

Determine the length of the list you're working with.

¿Todo estuvo claro?

Sección 1. Capítulo 5
toggle bottom row
course content

Contenido del Curso

Python Data Structures

List LengthList Length

When dealing with a sizable list, you might want to know the number of items it contains. You can determine this using the len() function, which returns the count of elements in the list. Let's dive into how it operates!

Note

A nested list is considered a single item. The len() function doesn't count the individual items inside a nested list as separate items of the main list.

Tarea

Determine the length of the list you're working with.

¿Todo estuvo claro?

Sección 1. Capítulo 5
toggle bottom row
some-alt