python 3 dot product of two vectors with out using numpy : I'm fairly new to coding in the Python 3 language. I'm looking to compute a code that checks the dimensions of two vectors and if they match computes the dot product of those two vectors using for loops and if statements. I'm trying to stay away from any built in python functions any help would be appreciated. Thank you in advance.


    def dot(vector01,vector02):
        result= []
        for i in range(len(vector01), len(vector02)):
            total = 0
            total += vector01[i] * vector02[i] 
            result.append(total)
        return result
        if len(vector01) == len(vector02):
            return result
        else:
            print(error)
    vector01 = [2, 3, 4]
    vector02 = [4, 2, 1]
    print(dot(vector01,vector02))