Comment

Eddie

Warning, this method is not guaranteed to be order-preserving. See http://docs.python.org/library/stdtypes.html#dict.items -- "CPython implementation detail: Keys and values are listed in an arbitrary order which is non-random, varies across Python implementations, and depends on the dictionary’s history of insertions and deletions." -- Note it says "arbitrary" and it is implementation-dependent.

Parent comment

Anonymous

what about dict(zip(seq,seq)).keys()