def prime(self, n):
        is_prime = [1 for _ in xrange(n + 1)]
        for i in xrange(2):
            is_prime[i] = 0

        n_max = int(math.sqrt(len(is_prime)))
        for i in xrange(2, n_max + 1):
            for j in xrange(2 * i, len(is_prime), i):
                is_prime[j] = 0

        return sum(is_prime)
is_prime[2*j::j] = 0
dataset/ETHPy150Open algorhythms/HackerRankAlgorithms/Red John is Back.py/Solution.prime