Turns out the difference between using xrange and range to get the integers from 1 to 1 million is several gigs of virtual memory. Good to know.
—