Replace Consecutive Chars With A Single Character Python