sorting a list numbers stored as strings

Carsten Haese carsten at
Mon Sep 24 14:09:21 CEST 2007

On Mon, 2007-09-24 at 19:58 +0800, Delaney, Timothy (Tim) wrote:
> I'm sure that in some version of Python it would have given a
> ValueError (due to the default radix being 0) but it appears to have
> changed to a default radix of 10 somewhere along the way.

Not even Python 1.5.2 seems to have a problem with leading zeroes:

Python 1.5.2 (#1, Nov  6 1999, 14:53:40) [C] on sco_sv3
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> int("08")

Carsten Haese

More information about the Python-list mailing list