Skip to content

Commit e8db313

Browse files
committed
Update wildcard-matching.py
1 parent 8d93982 commit e8db313

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/wildcard-matching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def isMatch(self, s, p):
102102
return not s and not p
103103

104104
if p[0] != '*':
105-
if not s or (p[0] == s[0] or p[0] == '?'):
105+
if p[0] == s[0] or p[0] == '?':
106106
return self.isMatch(s[1:], p[1:])
107107
else:
108108
return False

0 commit comments

Comments
 (0)