check on numerical value?
Steve Holden
sholden at holdenweb.com
Thu Jun 6 10:08:24 EDT 2002
"Shagshag13" <shagshag13 at yahoo.fr> wrote in message
news:adnqh7$ri6f$1 at ID-146704.news.dfncis.de...
> can't you use (after importing types) type(x) == types.FloatType (or
type.IntType)
>
That wouldn't be helpful, since raw_input() always returns a string. The OP
wants to know whether that string is a valid representation of a number.
regards
-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------
More information about the Python-list
mailing list