Need help....5/9 test cases only passing

Hello @aman89533, I have modified your code pls have a look into this,

s=input()
p=input()

n = len(s)
m = len(p)

dp=[[False for _ in range(m+1)] for _ in range(n+1)]
# for 1 indexing
dp[0][0] = 1

for i in range(0,n+1):
	for j in range(1,m+1):
		if (i > 0 and (s[i-1]==p[j-1] or p[j-1]=='.')):
			dp[i][j]=dp[i-1][j-1]
		elif p[j-1]=='*':
			dp[i][j]=((i > 0 and dp[i-1][j]) | dp[i][j-1])

print(int(dp[-1][-1]))

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.