Python3 List Directories

[Solved] Python3 List Directories | Perl - Code Explorer | yomemimo.com
Question : get list of folders in directory python

Answered by : adventurous-armadillo-bk53yrwqajve

import os
my_list = os.listdir('My_directory')

Source : https://stackoverflow.com/questions/31049648/how-to-get-list-of-subdirectories-names/31049721 | Last Update : Mon, 15 Jun 20

Question : list directory in python

Answered by : job-van-der-wal

from os import listdir
## Prints the current directory as a list (including file types)
print(os.listdir())

Source : | Last Update : Thu, 30 Apr 20

Question : python3 list directories

Answered by : clean-cow-7rcr62l42jto

import os
arr = os.listdir("c:/temp/")
print("\n".join(arr))

Source : https://www.stackvidhya.com/python-list-files-in-directory/ | Last Update : Sun, 22 Aug 21

Answers related to python3 list directories

Code Explorer Popular Question For Perl