Name

len()

Examples
message = "It was the best of strings, it was the worst of strings."
print(len(message)) # Prints 56

items = ["gorgonzola", "mozzarella", "edam", "gouda"]
print(len(items)) # Prints 4

capitals = {'NY': 'Albany', 'CA': 'Sacramento', 'FL': 'Tallahassee'}
print(len(capitals)) # Prints 3
Description
Syntax
len(a)
Parameters
a
Related list()
string
Dictionary
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License