def walk(folder, extension):
    if folder.endswith("/"):
        folder = folder[:-1]
    return glob.glob("%s/*.%s" % (folder, extension))
A simple non-recursive ``walk`` function to collect files with a given extension.
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/modules/fileutils.py/walk