More than just built in functions, any object that defines a __len__ and a __index__ method (that provide len(x) and x[0] respectively) can also be iterated over in a for loop (&#x27;for item in instance&#x27;). A good reference for magic methods is [1] for anyone interested.<p>1. <a href="http:&#x2F;&#x2F;www.rafekettler.com&#x2F;magicmethods.html" rel="nofollow">http:&#x2F;&#x2F;www.rafekettler.com&#x2F;magicmethods.html</a>