I have the following task:
write a Python2 function which prints the time the Python interpreter needs to loop through range from 0 to 4000000000, in a for cycle with an empty body
How can I solve this, my sys.maxint
is only 2147483647 ?
>>> range(4000000000)
OverflowError: range() result has too many items
>>> xrange(4000000000)
OverflowError: Python int too large to convert C long
I use Windows 7 64 bit and python 2.7.10