Say I have a file with 4 lines. In Python, how can I check this?
Given this sudo text file
line
another line
yet another line
last line
How can I iterate through this file to find the line count? Does Python have a builtin for this?
SOLUTION:
With the builtin len
function I was able to read the line total, thanks.