I came across various post and study material for xrange and Python generators, but its been quite long that I never saw someone comparing these 2 things together.
Its clear that xrange is not accepted in python3+, but can we consider generators as upgraded version of Python 2 xrange?
Both uses a iterator objects, both uses next() call. But the advantage of generator I learnt, we could make it pause with "yield", which is no such such thing for xrange.
Please help me understand the concept of both, and in which sense they are different? Also why xrange had to deprecated?