Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python get all folders in directory

import os
subfolders = [ f.path for f in os.scandir(folder) if f.is_dir() ]
Comment

get list of all files in folder and subfolders python

for path, subdirs, files in os.walk(root):
    for name in files:
        print os.path.join(path, name)
Comment

PREVIOUS NEXT
Code Example
Python :: how to create chess board numpy 
Python :: how to get variable from setings django 
Python :: Python tkinter window fullscreen with title bar 
Python :: tqdm notebook 
Python :: django foreign key field on delete do nothing 
Python :: nltk stop words 
Python :: python format currency 
Python :: get current week python 
Python :: how to place image in tkinter 
Python :: sklearn columntransformer 
Python :: pandas fillna with median of column 
Python :: len table python 
Python :: how to join a string by new line out of a list python 
Python :: mean deviation python 
Python :: tkinter start maximized 
Python :: django install whitenoise 
Python :: Extract categorical data features 
Python :: python fibonacci generator 
Python :: check package version python 
Python :: how to code a clickable button in python 
Python :: flask how to run app 
Python :: how to send audio with inline telebot 
Python :: increase contrast cv2 
Python :: dataframe show to semicolon python 
Python :: classification report value extration 
Python :: pandas lambda if else 
Python :: from csv to pandas dataframe 
Python :: pandas show all dataframe 
Python :: getting dummies for a column in pandas dataframe 
Python :: pandas dataframe hist title 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =