Question: what is the difference between range and xrange how has this changed over time?
Answer: The only difference is that range returns a Python list object and xrange returns an xrange object. ... It means that xrange doesn't actually generate a static list at run-time like range does. It creates the values as you need them with a special technique called yielding.