def smadi(s):
h, m, s = s.split(":")
h = int(h)
m = int(m)
s = float(s)
return s + m*60 + h * 3600
>>> print smadi("16:23:20.019519")
59000.019519
Jeff
pgpWjc1O3xtLf.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
hi;
i have a string that look like 16:23:20.019519 (i.e. system time)
without days and months. I want to convert it to just one long floating
point number with as many decimal places as possible. is there a
funciton to do that?
thanks
ms
--
http://mail.python.org/mailman/listinfo/python-lis