Converting exponential numbers to strings.

Paul Rubin phr-n2001d at nightsong.com
Mon Nov 5 23:20:31 CET 2001


steveb at nebcoinc.com (Steve) writes:

> Hi,
>    I'm new to python and I'm trying to write a routine to determine
> whether or not an object is numeric like so:

How about this:
   try:
      x = float(s)
      result = 1
   except:
      result = 0



More information about the Python-list mailing list