Python printing Deepdiff value -
i using deepdiff function find difference between 2 dictionaries, gives output as: a = {'dictionary_item_added': set(["root['mismatched_element']"])}. how print 'mismatched_element'?
try this:
set_item = a['dictionary_item_added'].pop() print set_item[set_item.find("['")+2 : set_item.find("']")] the first line gets element set, second removes [] , around them, , prints.
this code specific task asked for, it's hard generalize solution without more generalized question..
Comments
Post a Comment