About 493 letters

About 2 minutes

#len

Description: Get the length (by calling the object's __len__ method).

def len(obj):
    '''
    Get length

    :param obj: An object
    :return: The length of the object
    '''

Example:

print(len('hello world'))
print(len([1, 2, 3, 4, 5]))
print(len({'name': 'Alice', 'age': 17}))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Updated: 6/9/2025

Author: PlanC

Created: 6/9/2025