sorting items in a table problematic because of scientific notation

John Machin sjmachin at lexicon.net
Wed Apr 29 03:48:31 CEST 2009


 <skip <at> pobox.com> writes:
 
>     MRAB> FYI:
> 
>     >>> float(s)
>     105646.365517
> 
>     MRAB> which saves a few keystrokes. 
> 
> Thanks.  Didn't used to be that way I don't think.

  Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
  Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
  >>> float('    1.23456789e+004   ')
  12345.6789
  >>>

:-)





More information about the Python-list mailing list