We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

len

len(s)

Returns the length (the number of items) of an object. The argument may be a sequence (string, tuple or list) or a mapping (dictionary).

To make this function work on your own classes, implement the __len__ method.