Functions In File Handling In Python