compare values in same dictionary python