Jan-10-2019, 06:03 AM
Dictionary keys are hashed, so they are in "hashed" order, not input order. Use an OrderedDict if you want keys in original order. The latest version of Python uses an OrderedDict by default so it also depends on which version of Python you have installed.