def isNumber(self, s: str) -> bool:
"start": {"SIGN":"sign1", "DIGIT":"digit1", "DOT":"dot1"},
"sign1": {"DIGIT":"digit1", "DOT":"dot1"},
"digit1": {"DIGIT":"digit1", "DOT":"dot2", "EXP":"exp", "END": True},
"digit2": {"DIGIT":"digit2", "EXP":"exp", "END": True},
"dot1": {"DIGIT":"digit2"}, # 前面没数字
"dot2": {"DIGIT":"digit2", "EXP":"exp", "END": True}, # 前面有数字
"exp": {"SIGN":"sign2", "DIGIT":"D"},
"D": {"DIGIT":"D", "END": True}
if ch == ".": return "DOT"
elif ch in "+-": return "SIGN"
elif ch in "Ee": return "EXP"
elif ch.isdigit(): return "DIGIT"
state = states[state].get(get(c))
if not state: return False
return "END" in states[state]