Tuvas wrote: >I need a function that will tell if a given variable is a character or >a number. Is there a way to do this? Thanks! > > > In Python, all values have an associated type which you can query with type(v) thus:
from types import *
if type(v) == IntType:
... whatever ...
Several types would qualify as "numbers": IntType, FloatType, LongType,
and ComplexType,
and several as "strings": StringType and UnicodeType
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
