if character ' i ' is present at a particular index then add character ' i ' to 'new_str
' NEW_LINE INDENT for j in range ( n ) : NEW_LINE INDENT if ( str [ j ] == chr ( i ) ) : NEW_LINE INDENT new_str += str [ j ] NEW_LINE DEDENT DEDENT DEDENT