Skip to content

Instantly share code, notes, and snippets.

@bryjbrown
Created September 10, 2015 16:05
Show Gist options
  • Save bryjbrown/3a18b54aa5c7959d1b9d to your computer and use it in GitHub Desktop.
Save bryjbrown/3a18b54aa5c7959d1b9d to your computer and use it in GitHub Desktop.
Python file listing
import os
directory = os.getcwd()
files = os.listdir()
for file in files:
print("{} is a file in {}".format(file, directory))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment