"""


Write a function that takes a string, and returns a new string with any
duplicate _consecutive_ letters removed.

### Examples

    unstretch("ppoeemm") ➞ "poem"
    
    unstretch("wiiiinnnnd") ➞ "wind"
    
    unstretch("ttiiitllleeee") ➞ "title"
    
    unstretch("cccccaaarrrbbonnnnn") ➞ "carbon"

### Notes

Final strings _won't_ include words with double letters (e.g. "passing",
"lottery").

"""

def unstretch(word):
  term = word[0]
  count = 0
  
  for letter in word:
    if term[count] is not letter:
      term+=letter
      count+=1
  return term


824ab719bdd61ad538c1525c0571edf3dc6712dd
<mask token>

<mask token>


def unstretch(word):
    term = word[0]
    count = 0
    for letter in word:
        if term[count] is not letter:
            term += letter
            count += 1
    return term

"""


Write a function that takes a string, and returns a new string with any
duplicate _consecutive_ letters removed.

### Examples

    unstretch("ppoeemm") ➞ "poem"
    
    unstretch("wiiiinnnnd") ➞ "wind"
    
    unstretch("ttiiitllleeee") ➞ "title"
    
    unstretch("cccccaaarrrbbonnnnn") ➞ "carbon"

### Notes

Final strings _won't_ include words with double letters (e.g. "passing",
"lottery").

"""

def unstretch(word):
  term = word[0]
  count = 0
  
  for letter in word:
    if term[count] is not letter:
      term+=letter
      count+=1
  return term

