劍指offer python版 20.表示數值的字符串

""" 請實現一個函數用來判斷字符串是否表示數值(包括整數和小數)。 例如,字符串「+100」、「5e2」、「-123」、「3.123」、「-1E-16」都表示數值, 但"12e"、"1a3.14"、"1.1.2"、"+5"、"12e+5.4"都不是 """ class Solution: def isNumeric(self, s): if s is None or le
相關文章
相關標籤/搜索