Last active
March 31, 2024 20:14
-
-
Save pointofpresence/0bef88daa59b63eaa32eaf90dc3356e2 to your computer and use it in GitHub Desktop.
Python: Определить, является ли путь файлом или директорией
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os.path.isfile("bob.txt") # Does bob.txt exist? Is it a file, or a directory? | |
os.path.isdir("bob") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment