In Python, the use of the xrange() function is to generate a sequence of numbers that are similar to the range() function. But, the xrange() function is used only in Python 2. xx whereas the range() is used in Python 3.

BY Best Interview Question ON 31 May 2020