Python – Difference between “.append()” and “+= []”

In my new Django project, I was trying to append a list of tuples (which contained more than 1 tuple in it) into another list of tuples.

Then I got this error: ValueError: too many values to unpack (expected 2)

I was using .append() method to perform this operation and apparently that is exactly where the problem was.

Result: You cannot append a list of tuples with more than one item into another list of tuples using .append(). You need to use “+=” operator to do this.

Hope this helps.
Good Luck,