To get the size of a list, use the builtin function, len:
items =  items.append("green") items.append("orange") items.append("yellow")
len(s) argument returns the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).
len is implemented with
__len__, from the data model docs:
Called to implement the built-in function
len(). Should return the length of the object, an integer >= 0. Also, an object that doesn’t define a
__nonzero__() [in Python 2 or
__bool__()in Python 3] method and whose
__len__() method returns zero is considered to be false in a Boolean context.
And we can also see that
__len__ is a method of lists:
And in fact we see we can get this information for all of the described types:
>>> all(hasattr(cls, '__len__') for cls in (str, bytes, tuple, list, xrange, dict, set, frozenset)) True