Given an iterator user_iterator
, how can I iterate over the iterator a list of the yielded objects?
I have this code, which seems to work:
user_list = [user for user in user_iterator]
But is there something faster, better or more correct?
list(your_iterator)