Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
re and replace solution in Clear category for Adjacent Letters by adamspj
import re
def adjacent_letters(line: str) -> str:
while found := re.search(r"([a-zA-Z])\1", line):
line = line.replace(found.group(), '')
return line
March 5, 2024
Comments: