Sorting Driving Crazy: URGENT: PLEASE HELP

Paul Rubin http
Sat Mar 13 09:19:13 CET 2004


dont bother <dontbotherworld at yahoo.com> writes:
> When I print x and feature_vectors[x]  I get some of
> the entries which are not in the increasing order.

(keys shown are: 22836 22840 22841 22842 22844 22846 2357 3105 3117
3675 4280)

Those keys are sorted correctly.  You have entered them in the
dictionary as strings, not integers.  '22836' comes before '4280' just
like 'apple' comes before 'pear'.  



More information about the Python-list mailing list