I created the following dictionary
exDict = {True: 0, False: 1, 1: \'a\', 2: \'b\'}
and when I print exDict.keys(), well, it g
exDict.keys()
This happens because True == 1 (and False == 0, but you didn't have 0 as a key). You'll have to refactor your code or data somehow, because a dict considers keys to be the same if they are "equal" (rather than is).
True == 1
False == 0
0
dict
is