<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_number(s, cast=int):
 """ Try to get a number out of a string, and cast it. """

    import string
    d = "".join(x for x in str(s) if x in string.digits)
    return cast(d)