Beat 100% solution in python
\n\n# Code\n\nclass Solution:\n    def furthestDistanceFromOrigin(self, moves: str) -> int:\n        ans=0\n        for i in moves:\n            if i==\'R\':\n 
\n\n# Code\n```\nclass Solution:\n    def furthestDistanceFromOrigin(self, moves: str) -> int:\n        ans=0\n        for i in moves:\n            if i==\'R\':\n                ans+=1\n            else: ans-=1\n        h=0\n        for i in moves:\n            if i==\'L\':\n                h-=1\n            else: h+=1\n        return max(abs(h),abs(ans))\n```
['Python3']