Process the python dictionary to remove undesired elements and retain desired ones
Process the python dictionary to remove undesired elements and retain desired ones Question: I have a python dictionary as given below: ip = { "doc1.pdf": { "img1.png": ("FP", "text1"), "img2.png": ("NP", "text2"), "img3.png": ("FP", "text3"), }, "doc2.pdf": { "img1.png": ("FP", "text4"), "img2.png": ("NP", "text5"), "img3.png": ("NP", "text6"), "img4.png": ("NP", "text7"), "img5.png": ("Others", "text8"), "img6.png": ("FP", …