Blender collision sensor is triggered twice
If I remember correctly, collision sensors fire twice by design.  Once when set True, and another when False.

This isn't a problem when connected to an And or Not controller (because they check) but in a script you'll have to do something like this:

def collision(cont):
    # Loops through all connected sensors and returns if one is False
    # Basically makes it work like an And conroller.
    for sens in cont.sensors:
        if not sens.positive:
            return
    ...