@anonymous/

JadedActualQueenant

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def stretch(word):
    occurrences = []
    newWord = ""
    for w in word:
        newWord += w * (occurrences.count(w) + 1)
        occurrences.append(w)
    return newWord

print(stretch("tutu")) # tuttuu
print(stretch("queue")) # queuuee
print(stretch("bookkeeper")) # boookkkeeepeeer
print(stretch("repetitive")) # repeetittiiveee
print(stretch("uncopyrightables")) # uncopyrightables
print(stretch("abracadabra")) # abraacaaadaaaabbrraaaaa
print(stretch("mississippi")) # misssiisssssssiiipppiiii