Find ASCII equivalent of each & every number & add them using python

A simple way is to add them in the loop:

total = 0
for char in "99856":
    code = ord(char)
    print(f"{char} {code}", end="\n")
    total += code
print('Sum: ', total)