array next pointer

andrew cooke andrew at acooke.org
Tue Mar 17 07:35:45 EDT 2009


Andre Engels wrote:
[...]
>>>> b = a.__iter__()
>>>> b.next()
> 'cat'
>>>> b.next()
> 'dog'

not sure from what version, but certainly in 2.6 and on, you can improve
the syntax slightly:

>>> b = iter(a)
>>> b.next()

andrew





More information about the Python-list mailing list