Why I am getting this error: unsupported operand type(s) for +=: 'int' and 'list'. Can anyone help to solve this

inputs = [1,2,3,2.5]

weights = [[0.2,0.8,-0.5,1.0],
[0.5,-0.91,0.26,-0.5],
[-0.26,-0.27,0.17,0.87]]

layer_outputs =
for n_input, weight in zip(inputs, weights):
neuron_output = 0
neuron_output += n_input*weight
layer_outputs.append(neuron_output)

print(layer_outputs)

the first debug step could be to print some of the variable to help you understand the problem:

print(n_input, weight)
neuron_output += n_input*weight

weight is still a list, weights is a 2d array, so I think you need another loop