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 / 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


Please Help Members By Posting Answers For Below Questions

How can you share variables across modules?

923


What is the difference between local vs global in python?

899


Can you hack with python?

866


What are string literals in python?

969


Explain about negative indexing?

881


How to you make a python script executable on unix?

873


What is Python Set?

926


What is n in python?

832


Is Django written in Python?

915


Have you heard of the yield keyword in python?

833


How to clone or copy a list in python?

875


Explain the use of the ‘nonlocal’ keyword in python?

877


What is setup py?

856


Which is better c++ or java or python?

853


What are the disadvantages of the python?

969