Answers for "python code list list files in a folder"

18

get list of folders in directory python

import os 
my_list = os.listdir('My_directory')
Posted by: Guest on June-08-2020
1

python list all files in directory

import os
 arr = os.listdir()
 print(arr)
 
 >>> ['$RECYCLE.BIN', 'work.txt', '3ebooks.txt', 'documents']
Posted by: Guest on April-15-2021

Code answers related to "python code list list files in a folder"

Python Answers by Framework

Browse Popular Code Answers by Language