Add a weight force to vertices with Python

Hey guys !

I’m trying to code a custom panel and I wonder how my button can add vertices in a vertex group with a weight force already chosen.



layout = self.layout

row = layout.row ()
row.operator ("object.vertex_group_assign", text=" 0.5")


I Would like to add selected vertices with 0.5 weight force when this button is press.