You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In most places we convert the generators to lists. We should stop doing that and be more careful with using generators instead.
The advantage is that when we're looking for a user object, we don't care from which course we get it. Sometimes we search through all courses. If we use a generator, we can do obj = next(matching_users). If we use lists, we first need to generate the whole list to just pop the first element.
The text was updated successfully, but these errors were encountered:
In most places we convert the generators to lists. We should stop doing that and be more careful with using generators instead.
The advantage is that when we're looking for a user object, we don't care from which course we get it. Sometimes we search through all courses. If we use a generator, we can do
obj = next(matching_users)
. If we use lists, we first need to generate the whole list to just pop the first element.The text was updated successfully, but these errors were encountered: