How to get line count of a large file cheaply in Python? April 27, 2022 by Tarik How to get line count of a large file cheaply in Python?