FILEPTH = r"C:\Database\chunks\4_chunk.txt" with open(FILEPTH, "r", encoding="utf-8") as file: tab = file.readlines() print(len(tab)) #1842295