12345678910111213141516 """https://leetcode.com/problems/valid-number/description/"""class (object): def isNumber(self, s): """ :type s: str :rtype: bool """ try: float(s.strip()) return True except Exception: return False 赞微海报分享
近期评论