Programming Examples
Python program to read the full content of specified txt file
Write a Python program which accept the file name from user and print the all content of file in console.
Solutionfname=input("Enter the file name : ")
fp=open(fname,"r")
print(fp.read())
fp.close()
OutputEnter the file name : myfile.txt
Infomax Computer Academy
