So what, then, are the benefits of using generators over regular list-returning functions? The answer is lazy evaluation, and below I’ll give you a few examples of how laziness can be much better than “thoroughness”… 1,158 more words