for i in range(1000000000):
print(i)
This snippet gives memory error than How to run this loop. Any suggestions on how to run it.Thanks.
>>>MemoryError
UPDATE: Actually I was trying something like this:
arr = []
for i in xrange(1000000000):
arr.append(i*i)
print(max(set(arr)))
I don't know how to deal with such large numbers.