0

Can we use readlines function to count no. of new line character in files in python?

Question is regarding file in python.

1/30/2020 11:44:16 AM

Amey Godse

1 Answer

New Answer

+5

with open('file.txt') as f: print(len(f.readlines()))