A Simple Python 3 Solution!( Explained)
\nclass Solution:\n    def entityParser(self, text: str) -> str:\n        dat={"&quot;":"\\"",\n            "&apos;":"\'",\n            "&amp;":"&",\n          
```\nclass Solution:\n    def entityParser(self, text: str) -> str:\n        dat={"&quot;":"\\"",\n            "&apos;":"\'",\n            "&amp;":"&",\n            "&gt;":">",\n            "&lt;":"<",\n            "&frasl;":"/",\n             }\n        txt=\'\'\n        amp_idx,sem_idx=None,None\n        for i,e in enumerate(text):\n\t    \t# if & we update the amp_idx \n            if e=="&":\n                amp_idx=i\n\t\t\t# if ; we update sem idx\t\n            if e==";":\n                sem_idx=i\n\t\t   # if we don\'t have any amp_idx yet to be tracked just add the curr char from text\n            if amp_idx==None:\n                txt+=e\n\t\t\t# if we have amp_idx and sem_idx, means we have a contiguous block to compare in dat dictonary\n            if amp_idx!=None  and sem_idx!=None:\n                key = text[amp_idx:sem_idx+1] # we get that block to compare from text\n\t\t\t\t# if key in dat then we add the replacement in txt. e.g: &gt replace with >\n                if key in dat.keys():\n                    txt+=dat[key]\n\t\t\t\t# but what if we don\'t have that key in dat? e.g: &ambassador;. so we just add the full string aka key\t\n                else:\n                    txt+=key\n\t\t\t\t# assign the idx tracker to None to track next blocks\n                amp_idx,sem_idx=None,None\n\n        return txt\n```
['Python3']