Interview Query

Counting File Lines

Have you seen this question before?

Let’s say you’re given a huge 100 GB log file. You want to be able to count how many lines are in the file. 

Write code in Python to count the total number of lines in the file.

Next question: Newsfeed Model
Python 3.9.6
Loading editor
Use Shift + Enter to run code