4 ms·
It's not right. You should add one to the bound because "range" uses half-open intervals. Also, it only works in Python 3; in Python 2, it creates a list of a 1
by DerekL 13y ago
It's not right. You should add one to the bound because "range" uses half-open intervals. Also, it only works in Python 3; in Python 2, it creates a list of a 1000000000 integers, so you should use "xrange" instead.
- RussianCow 13y agoYep, my bad. Didn't really think before I posted. And yes, I was assuming Python 3, so use xrange on Python 2.