By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,172 Members | 727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,172 IT Pros & Developers. It's quick & easy.

xrange and range Which one is faster and why?

P: 1
xrange() and range..which one is faster
Sep 20 '11 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 2,851
There is a way to find out. Are you familiar with the timeit module? xrange is useful when dealing with a very large range and the available memory may be an issue.
Sep 20 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.