I figured it out, it was a simple take but for a newbie like me, it was difficult.
Code :
c4d.CallCommand(200000084)
tool = doc.GetActiveToolData()
tool[c4d.MDATA_SELECTION_VISIBLE] = not tool[c4d.MDATA_SELECTION_VISIBLE]
c4d.CallCommand(200000083)
tool = doc.GetActiveToolData()
tool[c4d.MDATA_SELECTLIVE_VISIBLE] = not tool[c4d.MDATA_SELECTLIVE_VISIBLE]
Thank you, everyone.