Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for CheckSum by TovarischZhukov
import string
def checkio(data):
retval=[]; data=data[::-1]; i=0
for elem in data:
if elem in string.ascii_letters+string.digits:
if i%2: val=ord(elem)-48
else: val=(ord(elem)-48)*2;val=val/10+val%10
retval.append(val)
i+=1
s=sum(retval)
return [str(10-s%10 if s!=10 else 0), s]
Feb. 3, 2016