You are viewing a single comment's thread. Return to all comments →
PYTHON CODE
def alternatingCharacters(s): # Write your code here d=0 sl=list(s) for i in range(0, len(sl)-1): if sl[i]==sl[i+1]: d+=1 return d
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 →
PYTHON CODE