here you go :
s = "test"
chk = reduce(lambda a,b : a^b, [ord(c) for c in s])
print "Checksum : ", chk, " \n"
sh-4.3$ python main.py
Checksum : 22
0
solved Need help for checksum on python