Python3 异常处理,4段代码.
class Solution(object): def isNumber(self, s): try: return float(s) and True except: return False