def trans_temperature(number, src=None, dest='K'):
    """
    transfer temperature from one unit to another
    Input:
        number: int/float/string, like 100/100.4/100.23C/100.23 Celsius
        src: default None, read from number, but could be given
        dest: default K
    Output:
        temperature number with dest as unit
    """
    import re
    VALID_TEMPERATURE_UNITS = ['k', 'c', 'f']
    if isinstance(number, str):
        res = re.match('^(\\d+\\.?\\d*)\\s*([A-Za-z]+)$', number)
        if re.match('^\\d+\\.*\\d*$', number):
            number = float(number)
        elif res:
            number, src = float(res[1]), res[2]
        else:
            raise ValueError(
                f'given number {number} is not a int/float or number with unit'
                )
    if not src:
        raise ValueError(f'src unit not given')
    src = src.lower()[0]
    dest = dest.lower()[0]
    assert src in VALID_TEMPERATURE_UNITS and dest in VALID_TEMPERATURE_UNITS, f'src:{src}, dest:{dest}'
    assert isinstance(number, (int, float)), 'number should be a int/float'
    if src == dest:
        return number
    if src == 'k':
        number -= 298.15
    elif src == 'f':
        number = (number - 32) * 5 / 9
    if dest == 'k':
        number += 298.15
    elif dest == 'f':
        number = (number + 32) * 9 / 5
    return number
