Prime permutations

Problem 49

The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.
There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this property, but there is one other 4-digit increasing sequence.
What 12-digit number do you form by concatenating the three terms in this sequence?
from itertools import permutations
from tools import primes_sieve2, is_prime


def run():
    primes = list(primes_sieve2(10001))
    for x in primes:
        if x in [1487, 4817, 8147]:
            continue
        if not (x in primes and '0' not in str(x)):
            continue
        l = list(set([int(''.join(p)) for p in permutations(str(x)) if is_prime(int(''.join(p)))]))
        l.sort()
        if len(l) >= 3:
            for n in l:
                if all([(n + 3330) in l, (n + 6660) in l]):
                    s = '%d%d%d' % (n, n + 3330, n + 6660)
                    if s != '148748178147':
                        return s