for x in range(0,len(no)): rotation = no[x:len(no)] + no[0:x] if not prime(int(rotation)) : return False return True