How is it that we can iterate over python strings when strings don\'t have an __iter__ function?
__iter__
$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:
From your link:
or it must support the sequence protocol (the __getitem__() method with integer arguments starting at 0).
__getitem__()
In [1]: 'foo'.__getitem__(0) Out[1]: 'f'