How do I make a script for adding modifiers?
I can just grab the length of the number of modifiers and then subtract it by one to get the index.

        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].name = name
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].vertex_group_a = vertex_a
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].vertex_group_b = vertex_b
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].mix_mode = 'ADD'
        bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].mix_set = 'B'