Conocer si el directorio existe
Nuevo tipEn Python es posible conocer si un directorio existe o no dentro de nuestro sistema. Para ello será necesario apoyarnos del exists del módulo os.path.
>>> import os
>>> path = '/Users/eduardo/Documents/tutorials'
>>> os.path.exists(path)
True
>>> path = 'PyWombat/String'
>>> os.path.exists(path)
False