Guest User

Untitled

a guest
Jan 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. my_obj_list = [<obj1>,<obj2>,<obj3>....]
  2.  
  3. def get_object() :
  4. for i in my_obj_list :
  5. yield i
  6.  
  7. obj = get_object()
  8.  
  9. manipulate_object(obj):
  10. # do some manipulation with the object
  11.  
  12. My question is will this go back and return the next object ?
Add Comment
Please, Sign In to add comment