1import os
2print(os.path.isdir("/home/el"))
3print(os.path.exists("/home/el/myfile.txt"))
1import os.path
2from os import path
3
4def main():
5
6 print ("File exists:"+str(path.exists('guru99.txt')))
7 print ("File exists:" + str(path.exists('career.guru99.txt')))
8 print ("directory exists:" + str(path.exists('myDirectory')))
9
10if __name__== "__main__":
11 main()