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
Зареєструйся Зараз
або Підпишись на майбутні тести