How to find if a directory exists in Python?
Answers
Answered by
0
Cheapest Way.
from os import listdir
try:
file = listdir('directory goes here')
print('Directory Found!')
except:
print('Directory Not Found')
Similar questions
Hindi,
6 months ago
Computer Science,
6 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago
Physics,
1 year ago