Skip to content

Commit be836ea

Browse files
committed
change variable name from s to number_string as it is more descriptive
1 parent 9899716 commit be836ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: strings/string_is_valid_number.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def classify_char(char: str) -> CharType | None:
100100
return None
101101

102102

103-
def is_valid_number(s: str) -> bool:
103+
def is_valid_number(number_string: str) -> bool:
104104
"""
105105
This function checks if the input string represents a valid number.
106106
@@ -161,7 +161,7 @@ def is_valid_number(s: str) -> bool:
161161
valid_final_states = {State.WHOLE, State.FRACTION, State.EXP_NUMBER}
162162
current_state = State.INITIAL
163163

164-
for char in s:
164+
for char in number_string:
165165
char_type = classify_char(char)
166166
if char_type is None or char_type not in state_machine[current_state]:
167167
return False

0 commit comments

Comments
 (0)