Count Lines in Text File Python Program
Topic: Count Lines in Text File Python Program # Python program to count # number of lines in a file # Input filename, open it in # read mode. display its cntents # count and display number of lines # www.EasyCodeBook.com file_name = input(“Enter file name:”) file1 = open(file_name, “r”) line_count = 0 print(“Contents of… Read More »