My code is:
for num in xrange(3, 9999999999, 2):
for n in xrange(1, num):
xrange won't work with large numbers since the code is executed as a C program (https://docs.python.org/2/library/functions.html#xrange).
According to docs -
CPython implementation detail: xrange() is intended to be simple and fast. Implementations may impose restrictions to achieve this. The C implementation of Python restricts all arguments to native C longs (“short” Python integers), and also requires that the number of elements fit in a native C long. If a larger range is needed, an alternate version can be crafted using the itertools module: islice(count(start, step), (stop-start+step-1+2*(step<0))//step).
I am not sure what system specs you got, but generally c int is 2^16-1 and c long is 2^32-1.