Next / Previous / Contents / TCC Help System / NM Tech homepage

20.22. len(): Number of elements

Given a sequence or dictionary, this function returns the number of elements.

>>> len('')
0
>>> len ( [23, 47, 'hike'] )
3
>>> len({1: 'foot', 2:'shoulder', 'feather': 'rare'})
3