Reputation: 1179
basically what the title says. I want to be able to find out how many objects a list contains. Maybe my Google-fu is failing me or my terminology is wrong.
Upvotes: 0
Views: 3576
Reputation: 483
Check out the len built-in function:
len(someList)
http://docs.python.org/library/functions.html#len
Upvotes: 0
Reputation: 85488
Return the length (the number of items) of an object. The argument may be a sequence (string, tuple or list) or a mapping (dictionary).
>>> l = [1, 2, 3]
>>> len(l)
3
Upvotes: 6