array next pointer

andrew cooke andrew at acooke.org
Tue Mar 17 12:35:45 CET 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