Function
fnmatch.filter

Signature

filter(names, pat)

Documentation String

Return the subset of the list NAMES that match PAT