Write a Python Program to Read a File and Capitalize the First Letter of Every Word in the File


Topic: Write a Python Program to Read a File and Capitalize the First Letter of Every Word in the File

Solution

fname = input("Enter file name: ")
with open(fname, 'r') as f:
    for line in f:
        l=line.title()
        print(l)
		
		
		



List all Python Programs