Is there any difference between range() and xrange() methods in Python 2.x?
Explanation
In Python 2.x range() method returns a whole list of numbers while xrange() returns a generator. Later this generator can be used to get numbers one by one in a so-called lazy evaluation manner. In Python 3 described range() method was deprecated and xrange() method was renamed to range().

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Python
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты