import math


def distance(a, b):
    """Euclidean distance between two points
    
    Parameters
    ----------
    a : list of array_like
        First 3D point
    b : list or array_like
        Second 3D point

    Returns
    -------
    d : float
        Euclidean distance between a and b
    """

    return math.sqrt((a[0] - b[0])*(a[0] - b[0]) +
                     (a[1] - b[1])*(a[1] - b[1]) +
                     (a[2] - b[2])*(a[2] - b[2]))