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],

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


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