[Python3] Faster than 90% submissions, simple code
Execution Result\n\n\nRuntime: 28 ms, faster than 90.93% of Python3 online submissions for Replace All ?\'s to Avoid Consecutive Repeating Characters.\nMemory U
`Execution Result`\n\n```\nRuntime: 28 ms, faster than 90.93% of Python3 online submissions for Replace All ?\'s to Avoid Consecutive Repeating Characters.\nMemory Usage: 14.1 MB, less than 92.19% of Python3 online submissions for Replace All ?\'s to Avoid Consecutive Repeating Characters.\n```\n\n`Solution`\n```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        chars = \'abcdefghijklmnopqrstuvwxyz\'\n        s = list(s)\n        while s.count(\'?\')!=0:\n            index = s.index(\'?\')\n\n            _prev = s[index-1] if index-1 >=0 else \'\'\n            _next = s[index+1] if index+1 <= len(s)-1 else \'\'\n\n            for char in chars:\n                if char != _prev and char != _next:\n                    s[index] = char\n                    break\n        return \'\'.join(s)\n```\n\n`Tested using below lines of code`\n```\nprint(Solution().modifyString(s = "?zs"))\nprint(Solution().modifyString(s = "ubv?w"))\nprint(Solution().modifyString(s = "j?qg??b"))\nprint(Solution().modifyString(s = "??yw?ipkj?"))\n```
['Python3']