A question about string and float number
weiguo6 at gmail.com
Thu Aug 7 03:23:15 CEST 2008
I am new of python. Could anyone help me a question as below?
Is there any function that can judge a string s is a float number or not?
FOr example, if s = '1.232' or s='1e+10', then it returns true, otherwise,
it will return false.
isdigit() in string doesn't work. float() will throw an exception and I just
need true or false as result.
Thanks a lot in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list