aboutsummaryrefslogtreecommitdiff
path: root/challenge-282/eric-cheung/python/ch-2.py
blob: 9c2845a71f94575f42b77256a7141c553f79fbd5 (plain)
1
2
3
4
5
6
7
8
## strInput = "pPeERrLl"  ## Example 1
## strInput = "rRr"  ## Example 2
strInput = "GoO"  ## Example 3

arrCount = [0 if strInput[nIndx].lower() == strInput[nIndx + 1].lower() else 1 for nIndx in range(len(strInput) - 1)]

print (sum(arrCount))