Program 34
Write a program to demonstrate try/finally and with/as.
Program for try/finally:
Output:
Program for with/as:
file1.txt and file2.txt created in the current directory.