Python close method – closing a file

Python close method: The close is a method of IOBase class in Python that flush and close the current stream.