Search Suggest

Bài đăng

Check file exist or not in python

 import os

fname=input("Enter file name:")


if os.path.exists(fname):

    print("File exist")

else:

    print("File not exist")

Đăng nhận xét