find sin python3

Solutions on MaxInterview for find sin python3 by the best coders in the world

showing results for - "find sin python3"
Melina
27 Mar 2020
1import fnmatch
2import os
3from typing import List
4
5
6def find_files(pattern, path) -> List[str]:
7    """Takes a shell pattern and a path and returns a list of file path strings"""
8    result: List[str] = []
9    for root, dirs, files in os.walk(path):
10        for name in files:
11            if fnmatch.fnmatch(name, pattern):
12                result.append(os.path.join(root, name))
13    return result
14