Skip to content

Commit 3faf2cd

Browse files
committed
change variable name from s to number_string as it is more descriptive
1 parent 0b4271a commit 3faf2cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strings/string_is_valid_number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def classify_char(char: str) -> CharType | None:
196196
return None
197197

198198

199-
def is_valid_number(s: str) -> bool:
199+
def is_valid_number(number_string: str) -> bool:
200200
"""
201201
This function checks if the input string represents a valid number.
202202
@@ -257,7 +257,7 @@ def is_valid_number(s: str) -> bool:
257257
valid_final_states = {State.WHOLE, State.FRACTION, State.EXP_NUMBER}
258258
current_state = State.INITIAL
259259

260-
for char in s:
260+
for char in number_string:
261261
char_type = classify_char(char)
262262
if char_type is None or char_type not in state_machine[current_state]:
263263
return False

0 commit comments

Comments
 (0)