check on numerical value?

Emile van Sebille emile at fenx.com
Thu Jun 6 15:04:17 CEST 2002


<pixie888 at hotmail.com> wrote in message
> Is there any way to discover when a value is numerical or not in
> Python? I want a check in my code on a given value. If somebody enters
> or gives me something like "akjlvqùirq" this is surely not a numerical
> value.
>

int(value) or float(value) depending on what values you'd except.

--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list