def dot_v3 ( v , w ) : return sum ( [ x * y for x , y in zip ( v , w ) ] )
dot product of vectors python
Return the dotproduct of two vectors .
def dot_v3(v, w):
    """Return the dotproduct of two vectors."""

    return sum([x * y for x, y in zip(v, w)])