Read file line by line in Python

Prerequisites :

Python provides built-in functions for creating, writing and reading files. There are two types of files that can be processed in Python, plain text files and binaries (written in binary, 0s and 1s ). In this article, we`re going to explore reading lines from a file.