If a Python string variable has had either an integer, floating point number or a non-numeric string placed in it, is there a way to easily test the \"type\" of that value?<
use .isdigit():
In [14]: a = '145' In [15]: b = 'foo' In [16]: a.isdigit() Out[16]: True In [17]: b.isdigit() Out[17]: False In [18]: