Trading Space for Speed 🚀 – Even Beginners Can Understand! | Python 3
Convert string to listCode
Convert string to list

# Code
```python3 []
class Solution:
    def hasSameDigits(self, s: str) -> bool:
        s = list(s)
        temp = s

        while len(s) != 2:
            size = len(s)
            s = []
            for x in range(size-1):
                s.append(str(int(int(temp[x]) + int(temp[x+1])) % 10))
            temp = s

        return s[0] == s[1]
        
```
['Python3']