Python Simple DP
Similar problem: 10. Regular Expression Matching with Explanation\npython\n    # DP\n    def isMatch(self, s: str, p: str) -> bool:\n        dp = [[False]*(len(
[Similar problem: 10. Regular Expression Matching with Explanation](https://leetcode.com/problems/regular-expression-matching/discuss/336345/python-simple-dp/308355)\n```python\n    # DP\n    def isMatch(self, s: str, p: str) -> bool:\n        dp = [[False]*(len(p)+1) for i in range(len(s)+1)]\n        dp[0][0] = True\n        for j in range(1,len(p)+1):\n            if p[j-1] == \'*\':\n                dp[0][j] = dp[0][j-1]\n        \n        for i in range(1,len(s)+1):\n            for j in range(1,len(p)+1):\n                dp[i][j] = (p[j-1] in [s[i-1],\'?\',\'*\'] and dp[i-1][j-1]) or (p[j-1] == \'*\' and (dp[i][j-1] or dp[i-1][j]))\n  \n        return dp[len(s)][len(p)]\n```
['Dynamic Programming', 'Python3']