how can I calculate the complexity O of these lines?
1- a function that returns weights in the form of a tensor PyTorch
def weights(n, alpha):
    w=torch.tensor([(alpha**i)*(1-alpha) for i in range(n)])
    return w

2- then I multiply each element of a list by its weight:
n = 6
alpha = 0.5
List = List * weights(n, alpha) // List is a pytorch tensor which contains integers

and thank you