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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -