Skip to content

Instantly share code, notes, and snippets.

@Robofied
Created February 3, 2019 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robofied/2900f707592313ea9a6c10e8024906b2 to your computer and use it in GitHub Desktop.
Save Robofied/2900f707592313ea9a6c10e8024906b2 to your computer and use it in GitHub Desktop.
## Already existing standard library, comes already installed while installing Python package.
import os
## using list dir, listing the files and folders in that particular directory.
for e in os.listdir(r'C:\Users\Robofied\Documents\getting started with python'):
print(e)
#[Output]:
## These are the output files conyained in the directory.
.ipynb_checkpoints
Conditional Statements.ipynb
Dictionary.ipynb
file1.txt
file2.txt
Files in Python.ipynb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment