for p in primes:
    prime_str = str(prime)
for i in range(len(prime_str)):
    if int(prime_str[i:] + prime_str[:i]) not in primes:
        break
else:
    circular.append(p)
Speeding up string splitting and concatenation