Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Explicit is better than implicit solution in Clear category for CheckSum by veky
def checkio(data):
import string
checksum = position = 0
for character in reversed(data):
if character in string.digits + string.ascii_uppercase:
value = ord(character) - 48
checksum += value if position%2 else sum(map(int, str(value*2)))
position += 1
return [str(-checksum%10), checksum]
Aug. 28, 2013
Comments: