Write a python function to calculate the dot product of two lists


Topic: Write a python function to calculate the dot product of two lists

Solution

def dot(l1, l2):
    return sum(x*y for x,y in zip(l1, l2))



List all Python Programs