Wednesday, 12 August 2020

Program 34

 Program 34

Write a program to demonstrate try/finally and with/as.

Program for try/finally:

Output:

Program for with/as:

Output:

file1.txt  and file2.txt created in the current directory.