A Python implementation of this technique is presented in Listing 1. Function file_split_rows () calls a program-defined helper function line_count () and uses a NumPy (aliased as np) array object.