Sunday 26 June 2016

numbers in string come out as "not numbers" or fals - Python

So, I have a list of strings in python, and I am trying to find which keys are numbers.
I am trying to use list.[key].isdigit() but it only works with '0'
For instance:




list = ['0', '0', '0', '0.450000000000000', '0', '0', '0', '0.550000000000000']


will only determine that '0' is a digit, but '0.45' and '0.55' are not.
How can I fix this problem?



Thank you very much

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...