PythiloHard · 40 min · Task 91 of 100 · progress kept in this browser

Match wildcard paths as text

Match the whole text against a glob pattern: question mark matches one character and star matches any sequence including empty. All other characters are literal, including slash.

previous = [True, False, False]
current = [True]
for i in range(1, len(previous)):
    current.append(previous[i] or current[i-1])
print(current)
Your task

Match the whole text against a glob pattern: question mark matches one character and star matches any sequence including empty. All other characters are literal, including slash.