Source Code:
(back to article)
string_value = "id" if string_value.isnumeric(): float_value = float(string_value) else: print("The value is not a valid number.")
Result:
Report an issue