How to Check end of file in Python

Checking EOF in python is one of the trickiest parts. Since Python does not provide any such function or parameter. Simple solution is here