My current algorithm to check the primality of numbers in python is way to slow for numbers between 10 million and 1 billion. I want it to be improved knowing that I will never
You can first divide your n only by your primes_under_100.
n
primes_under_100
Also, precompute more primes.
Also, you're actually store your range() result in memory - use irange() instead and use this memory for running Sieve of Eratosthenes algorithm.
range()
irange()