Answer Posted / nashiinformaticssolutions
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 we execute python?
Differentiate between split(), sub(), and subn() methods of the re module?
Executing dml commands through python programs?
How many types of operators python has?
What is pyunit in python?
How are instance variables different from class variables?
What is unboundlocalerror in python?
How to clone or copy a list?
What is tuple unpacking?
What is the best notepad?
Does amazon use python?
What is variable length argument in function?
Tell me is there a switch or case statement in python?
What is a frozen set in python?
How to convert strings into integers in python?