[ create a new paste ] login | about

Link: http://codepad.org/gyUmadgj    [ raw code | output | fork ]

Python, pasted on Dec 1:
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])))


Output:
1
3


Create a new paste based on this one


Comments: