Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. >>> s = 'abc'
  2. >>> it = iter(s)
  3. >>> it
  4. <iterator object at 0x00A1DB50>
  5. >>> it.next()
  6. 'a'
  7. >>> it.next()
  8. 'b'
  9. >>> it.next()
  10. 'c'
  11. >>> it.next()
  12. Traceback (most recent call last):
  13. File "<stdin>", line 1, in ?
  14. it.next()
  15. StopIteration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement