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
How do you use modulus in python?
What is subclass in python?
What is the proper way to say good bye to python?
How to find bugs or perform static analysis in a python application?
What does ‘#’ symbol do in python?
What does the ord() function do in python?
What are metaclasses in python?
What is self and init in python?
What is the best free ide for python?
What are the tools that help to find bugs or perform analysis?
What is python list function?
What is a generator?
How does the ternary operator work in python?
Which python function will you use to convert a number to a string?
What are class or static variables in python programming?