Persistent Systems Interview Question

Technical round - how to do file handling in python, how to write custom middlewares.