venture of iit bombay vjti alumni example this example opens filewrites content in thefile and comes out gracefully because there is no problem at all #!/usr/bin/python tryfh open("testfile"" "fh write("this is my test file for exception handling!!"except ioerrorprint "errorcan\' find file or read dataelseprint "written content in the file successfullyfh close(this produces the following result