I often do vector addition of Python lists.

Example: I have two lists like these:

a = [0.0, 1.0, 2.0]
b = [3.0, 4.0, 5.0]


I now want to add b to a to get the result a = [3.0, 5.0, 7.0].

Usually I end up doing like this:

a[0] += b[0]
a[1] += b[1]
a[2] += b[2]


Is there some efficient, standard way to do this with less typing?

UPDATE: It can be assumed that the lists are of length 3 and contain floats.


Question: Unable to grab image from usb Webcam
Answer: If you have not already done so, you should try updating your firmware and kernel, in case you are using the officially supported Debian distribution (aka Raspbian). Just follow the instruction you can find here. They just fixed many USB issues (the usb host driver still has a lot of issues left), so you would want to try that.

Also, you should check if the system reports any error through the dmesg command. There is a check-list you can follow to help pinpoint your problem: you can find it here.