题目描述请点击查看LeetCode 题目描述
Python3 代码解答如下:
import re
class Solution:
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
a = re.findall(p, s)
isMatch = False
if len(a) and a[0] == s:
isMatch = True
else:
isMatch = False
print(isMatch)
return isMatch