Answer Posted / glibwaresoftsolutions
Functionality-wise, xrange and range are nearly identical. Both of these let you create an integer list that you may use however you like. The only distinction between xrange and range is that x range returns an xrange object, whereas range returns a Python list object. Range will use as much memory as possible to produce your array of numbers, which can result in a memory error and crash your program. This is particularly true if you are working with a device that needs a lot of memory, like a phone. It has a memory issue and is a beast.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Do monkeys sleep at night?
What is python? What are the benefits of using python?
How do you find the type and identification number of an object in python?
What are docstrings and comments?
Does Python support strongly for regular expressions? What are the other languages that support strongly for regular expressions?
What is the purpose of uuid?
How would you work with numbers other than those in the decimal number system?
How will you print the contents of a file?
Which programming language is best for finance?
What is python, what are the benefits of using it, and what do you understand of pep 8?
Is multithreading possible in python?
Write a program to convert all strings in list to integers?
Why python has no private?
What is meant by instantiating a class?
Why does it say none in python?