1 2 3 4 5
#!/usr/bin/env python3 INPUT = "1122" print(sum(map(lambda a, b: int(a) if a == b else 0, INPUT, INPUT[1:]+INPUT[0])))
1
3