Skip to content

Instantly share code, notes, and snippets.

@lucascheung
Created July 16, 2020 14:02
Show Gist options
  • Save lucascheung/932948d8f66d4ceb53b76038a3b4e948 to your computer and use it in GitHub Desktop.
Save lucascheung/932948d8f66d4ceb53b76038a3b4e948 to your computer and use it in GitHub Desktop.
all files in a directory to list
from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment