[Python3] Clean Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def executeInstructions(self, n: int, startPos: List[int], s: str) -> List[int]:\n        row,col,res=startPos[0],startPos[1],[]\n        for i in range(len(s)):\n            startPos[0],startPos[1],arr,count=row,col,s[i:],0\n            for j in arr:\n                if j=="R":\n                    if startPos[1]+1==n:break\n                    else:\n                        startPos[1]+=1\n                        count+=1\n                elif j=="L":\n                    if startPos[1]-1==-1:break\n                    else:\n                        startPos[1]-=1\n                        count+=1\n                elif j=="U":\n                    if startPos[0]-1==-1:break\n                    else:\n                        startPos[0]-=1\n                        count+=1\n                elif j=="D":\n                    if startPos[0]+1==n:break\n                    else:\n                        startPos[0]+=1\n                        count+=1\n            res.append(count)\n        return res\n```
['Simulation', 'Python', 'Python3']