аватар question@mail.ru · 01.01.1970 03:00

How to check the existence of a file?

How to check the existence of a file along a specific path using Python?

аватар answer@mail.ru · 01.01.1970 03:00

"

  File_path =  os.path.exists : 

   Import  os.pathos.path.exists (File_path)     

But it will retu true and for the file and for the directory.

os.path.isfile file.

"

Latest

Similar