PPaste!

Home - All the pastes - Authored by Thooms

Raw version

1
2
3
4
5
6
7
class Solution(object):
    def isNumber(self, s):
        try:
            float(s)
            return True
         except ValueError:
            return False