What I want to do is to verify if a string is numeric -- a float -- but I haven't found a string property to do this. Maybe there isn't one. I have a problem with this code:
N = raw_input("Ingresa Nanometros:");
if ((N != "") and (N.isdigit() or N.isdecimal())):
N = float(N);
print "%f" % N;
As you can see, what I need is to take only the numbers, either decimal or float. N.isdecimal()
does not resolve the problem that I have in mind.