def get_precision(number):
    """
    Returns leading precision of number.

      - convert float to string
      - find position of decimal point relative to the length of the string

    Args:
        number (int, float)

    Returns:
        precision (int)

    Example:
        | >> get_precision(5.00000)
        | 1
        | >> get_precision(5.12300)
        | 3
    """
    if type(number) is str:
        number = number.rstrip("0")
    s = str(number)
    precision = s[::-1].find('.')
    return precision