Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Differentiate between range and xrange.

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


Please Help Members By Posting Answers For Below Questions

Python ­ How to create a multidimensional list?

1090


What is the biggest challenge facing your current job right now? What is your biggest failure?

835


What happens with the following function definition?

1014


Do they know a tuple/list/dict when they see it?

996


How do I run notepad ++ in python?

1024


How is python better than c?

880


Does python support switch or case statement in Python? If not what is the reason for the same?

975


What is python good for?

984


Is python call by reference or value?

914


How will you convert a string to all lowercase?

864


How to pass indefinite number of arguments to any function?

935


What is python used for at google?

1043


How do I create a variable number of variables?

928


What are disadvantages of python?

963


Explain the uses of the modules sqlite3, ctypes, pickle, traceback, and itertools.

992