I am trying to find all the .c files in a directory using Python.
.c
I wrote this, but it is just returning me all files - not just .c files.
KISS
# KISS import os results = [] for folder in gamefolders: for f in os.listdir(folder): if f.endswith('.c'): results.append(f) print results