dic1 = {'a':'a','b':'c','c':'d'}
dic2 = {'b':'a','a':'c','c':'d'}
dic1.keys() =>['a', 'b', 'c']
dic2.keys() =>['b', 'a', 'c']
dic1 and dic2 have the same keys, but in different order.
How to tell they have same keys(do not consider the order)?
python 2.7
dict views:
Supports direct set operations, etc.
similarly in 3.x: (thx @lennart)
python 2.4+
set operation: direct iteration over dict keys into a set