Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## 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
You can’t perform that action at this time.