Guest User

Untitled

a guest
Sep 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. def iterator(ls):
  2. while True:
  3. try:
  4. print(next(ls))
  5. except StopIteration:
  6. break
  7.  
  8. iterator(iter([1,2,3,4]))
Add Comment
Please, Sign In to add comment