Using itertools you can create an iterator of limits to walk over. This essentially is a double loop, but for more extensible as you can have an arbitrary number of inputs with itertools.product
and you don't store all the limits at once:
import numpy as np
from scipy.integrate import dblquad
import itertools
f = lambda xa,xb: np.exp(-(xa-xb)**2)
intg = lambda (x1,x2): dblquad(f,-np.inf,x1,
lambda x:-np.inf,
lambda x:x2)
X1 = np.arange(1,6)
X2 = np.arange(5,10)
for limit in itertools.product(X1,X2):
print limit, intg(limit)
If you need more speed, you can look into the multiprocessing
module for parallel computation since each process is independent.