How to write a program in Python to implement a library management system using file handling technique?