python - How do I check whether a file exists without exceptions? - Stack Overflow

PHOTO EMBED

Wed Dec 15 2021 00:23:03 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user]

if my_file.exists():
    # path exists
content_copyCOPY

https://stackoverflow.com/questions/82831/how-do-i-check-whether-a-file-exists-without-exceptions