def only_num(d):
    return {k: v for (k, v) in d.items() if ((isinstance(v, (int, float)) and (not isinstance(v, bool))) or (hasattr(v, 'isdigit') and v.isdigit()))}
def only_num(d):
    return {k: v for (k, v) in d.items() if ((isinstance(v, (int, float)) and (not isinstance(v, bool))) or (hasattr(v, 'isdigit') and v.isdigit()))}