Answer Posted / hr@tgksolutions.com
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
What is an egg in python?
What is the purpose of the single underscore “_” variable in python?
How does inheritance work in python?
Explain the //, %, and ** operators in python?
How does numpy arange work?
What is the best flask or Django
How would you make a python script executable on unix?
Can you learn python with no experience?
How to import modules in python?
How we can copy an object in python?
How to pass indefinite number of arguments to any function?
Print contents of a file ensuring proper error handling?
What is the syntax for exponentiation and give example?
What is the dogpile effect?
What is pop in python?