def unit_conversion(current, desired):
    """
    Calculate the conversion from one set of units to another.

    Parameters
    ---------
    current : str
        Unit system values are in now (eg 'millimeters')
    desired : str
        Unit system we'd like values in (eg 'inches')

    Returns
    ---------
    conversion : float
        Number to multiply by to put values into desired units
    """
    current = str(current).strip().lower()
    desired = str(desired).strip().lower()
    conversion = TO_INCH[current] / TO_INCH[desired]
    return conversion
def unit_conversion ( current , desired ) : current = str ( current ) . strip ( ) . lower ( ) desired = str ( desired ) . strip ( ) . lower ( ) conversion = TO_INCH [ current ] / TO_INCH [ desired ] return conversion
Calculate the conversion from one set of units to another.

    Parameters
    ---------
    current : str
        Unit system values are in now (eg 'millimeters')
    desired : str
        Unit system we'd like values in (eg 'inches')

    Returns
    ---------
    conversion : float
        Number to multiply by to put values into desired units