Now if there are adjacent similar character remove that character from s1
for i in range ( 1 , len ( s1 ) ) : NEW_LINE INDENT if s1 [ i ] != s1 [ i - 1 ] : NEW_LINE INDENT a += getString ( s1 [ i ] ) NEW_LINE DEDENT DEDENT