题目如下: Python代码: # -*- coding:utf-8 -*- def ismatch(s,p): #先将dp[s+1][p+1]二维数组全置为False dp = [[False] * (len(s) + 1) for _ in range(len(p)+1)] dp[0][0] = True for i in range(1,len(p)): dp[i+1][0] = dp[i-1][0] and p[i] == '*' for i in range(len(p)): for…