《Leetcode of September 》剑指 Offer 20. 表示数值的字符串

tech2022-07-14  130

题目链接:

20.表示数值的字符串

class Solution: def isNumber(self, s: str) -> bool: try: float(s) except: return False return True

 总结:答案实在是看不明白,投机取巧好方法。

最新回复(0)