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 dictionarys history of insertions and deletions." -- Note it says "arbitrary" and it is implementation-dependent.
Comment
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 dictionarys history of insertions and deletions." -- Note it says "arbitrary" and it is implementation-dependent.
Parent comment
what about dict(zip(seq,seq)).keys()