1class Solution:2 def isNumber(self, s: str) -> bool:3 if (4 s == "inf"5 or s == "-inf"6 or s == "+inf"7 or s == "Infinity"8 or s == "-Infinity"9 or s == "+Infinity"10 ):11 return False12 try:13 float(s)14 except Exception:15 return False16 return True
WPM •0 •0
ACC •0 •0
TIME •0