Write a Python program to find the number of lines in a text
file ‘abc.txt'.
Answers
Answered by
1
Answer:
This program in Data file handling in Python emphasizes the counting the number of lines in a text file in Python. Approach: Open the file in read mode and assign a file object named “file”. Assign 0 to the counter variable. Read the content of the file using read function and assign it to a variable named “Content”.
Explanation:
brainliest pls
Similar questions
Math,
1 month ago
Biology,
1 month ago
Environmental Sciences,
2 months ago
Hindi,
9 months ago
Math,
9 months ago