2015年10月26日 星期一

[python] 兩個 dict 字典怎麼找出相異的key difference in keys contained in two Python dictionaries



A,B 各是一個dict

diff = set(B) -set(A)


dictionary - Calculate difference in keys contained in two Python dictionaries - Stack Overflow
http://stackoverflow.com/questions/1165352/calculate-difference-in-keys-contained-in-two-python-dictionaries
dictionary - Calculate difference in keys contained in two Python dictionaries - Stack Overflow
http://stackoverflow.com/questions/1165352/calculate-difference-in-keys-contained-in-two-python-dictionaries


沒有留言:

張貼留言