Strings Difference in ascii

Help me in this question.

hi aryan
All we need to do is just traverse the whole string and for every two adjacent characters just calculate the ascii among them. We will print the characters and the difference between with characters

calculate the difference between the two chars of string as
int(str[i]- str[i-1])