0 ms | Beats 100.00% | Easy and Effective Code
Code
# Code
```python3 []
class Solution:
    def scoreOfString(self, s: str) -> int:
        result = 0
        for j in range(len(s)):
            if j < (len(s)-1):
                process = abs(ord(s[j]) - ord(s[j+1]))
                result += process
        return result
```
![Screenshot (178).png](https://assets.leetcode.com/users/images/8ddbab16-7235-4052-b6f8-441daac60322_1743932872.721591.png)

['String', 'Python3']