Your question is Wildcard Pattern Matching. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A Voleon research pipeline uses compact patterns to select text-based instrument labels. Given a string s and a pattern p, determine whether the entire string matches the entire pattern.
The pattern contains lowercase English letters, *, and ?:
* matches one or more arbitrary characters.? matches zero or one arbitrary character.s and p.Return True if the string matches the pattern, otherwise return False.
Implement wildcard_match(s, p), where both inputs are strings. Return a Boolean.
def wildcard_match(s, p):