Python code for hospital management system