def convert_from(input, source):
    """
    Convert from one base to digit
    :param input: String
    :param source: all digits for a base
    :return: Int
    """
    base = len(source)
    result = 0
    for power, i in enumerate(input[::-1]):
        result +=source.index(i) * pow(base, power)
    return result