We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b4271a commit 3faf2cdCopy full SHA for 3faf2cd
strings/string_is_valid_number.py
@@ -196,7 +196,7 @@ def classify_char(char: str) -> CharType | None:
196
return None
197
198
199
-def is_valid_number(s: str) -> bool:
+def is_valid_number(number_string: str) -> bool:
200
"""
201
This function checks if the input string represents a valid number.
202
@@ -257,7 +257,7 @@ def is_valid_number(s: str) -> bool:
257
valid_final_states = {State.WHOLE, State.FRACTION, State.EXP_NUMBER}
258
current_state = State.INITIAL
259
260
- for char in s:
+ for char in number_string:
261
char_type = classify_char(char)
262
if char_type is None or char_type not in state_machine[current_state]:
263
return False
0 commit comments