The function f(x) reverses the order of characters in a string, and if the input is a string of digits, it reverses the order of the digits.

[CODE]:
```python
def f(x):
    if x.isdigit():
        return x[::-1]
    else:
        return x[::-1]
```
Note: The code above assumes that the function `f(x)` is defined within the script `function.py`. If this is not the case, please let me know so that I can assist you further.