import math


def euclidean(vec1, vec2):
    """
    距离函数: 欧几里得距离.
    :param vec1:
    :type vec1: list[numbers.Real]
    :param vec2:
    :type vec2: list[numbers.Real]
    :return:
    """
    d = 0.0
    for i in range(len(vec1)):
        d += (vec1[i] - vec2[i]) ** 2
    return math.sqrt(d)