Compare every consecutive character with the odd value
if ( checkOdd ( num_str [ x ] ) and checkOdd ( num_str [ x + 1 ] ) ) : NEW_LINE INDENT result_str = ( result_str [ : x + 1 ] + ' - ' + result_str [ x + 1 : ] ) NEW_LINE num_str = result_str NEW_LINE x += 1 NEW_LINE DEDENT x += 1 NEW_LINE