Score of a String 
IntuitionThe problem requires calculating the sum of the absolute differences between the ASCII values of adjacent characters in a given string. Since the absol
# **Intuition**
The problem requires calculating the sum of the absolute differences between the ASCII values of adjacent characters in a given string. Since the absolute difference measures how far apart two values are, we can efficiently solve this by iterating through the string and summing up these differences.

---

# **Approach**
1. Initialize a variable `Ret` to store the cumulative score.  
2. Loop through the string from index 0 to `len(s) - 2` (to avoid index out-of-bounds error).  
3. For each index `i`, calculate the absolute difference between the ASCII values of `s[i]` and `s[i + 1]` using `ord()` and add it to `Ret`.  
4. Return the final value of `Ret` as the score.  

This approach leverages a single loop, making it efficient for strings of length up to 100.  

---

# **Complexity Analysis**
- **Time Complexity:** $$O(n)$$  
  We iterate through the string exactly once, where \( n \) is the length of the string.  

- **Space Complexity:** $$O(1)$$  
  The solution uses a constant amount of space regardless of the input size.  

---


# Code
```python3 []
class Solution:
    def scoreOfString(self, s: str) -> int:
        Ret = 0
        for i in range(len(s) - 1):
            Ret += abs(ord(s[i]) - ord(s[i + 1]))
        return Ret
```
['String', 'Python3']