human
Parse String to Float or Int
assistant
Here is some code to parse String `s` to Float or Int

try:
    return int(s)
except ValueError:
    return float(s)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.