[python] Removing multiple keys from a dictionary safely