You are viewing a single comment's thread. Return to all comments →
def alternatingCharacters(s):
# Write your code here deletions=0 for i in range(1,len(s)): if s[i-1]==s[i]: deletions+=1 return deletions
Seems like cookies are disabled on this browser, please enable them to open this website
Alternating Characters
You are viewing a single comment's thread. Return to all comments →
def alternatingCharacters(s):