loop to store every digit one by one at index j
for i in range ( 10 ) : NEW_LINE INDENT c = str ( i ) NEW_LINE str1 = str1 [ : j ] + c + str1 [ j + 1 : ] NEW_LINE Num = int ( str1 ) NEW_LINE if ( str1 [ j ] != s [ j ] and isPrime ( Num ) ) : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT return True NEW_LINE