Easy Python
python\nclass Solution:\n    def canTransform(self, start: str, end: str) -> bool:\n        # Same number of L and R\n        if start.replace(\'X\', \'\') != e
```python\nclass Solution:\n    def canTransform(self, start: str, end: str) -> bool:\n        # Same number of L and R\n        if start.replace(\'X\', \'\') != end.replace(\'X\', \'\'):\n            return False\n        # L can only move left and R can only move right\n        l_start = [i for i, c in enumerate(start) if c == \'L\']\n        r_start = [i for i, c in enumerate(start) if c == \'R\']\n        l_end = [i for i, c in enumerate(end) if c == \'L\']\n        r_end = [i for i, c in enumerate(end) if c == \'R\']\n        if any(l_start[i] < l_end[i] for i in range(len(l_start))):\n            return False\n        if any(r_start[i] > r_end[i] for i in range(len(r_start))):\n            return False\n        return True\n```
['Python', 'Python3']