To control the servos with Python, you can refer to the logic in our tutorial chapter “5.3 Ultrasonic Gripping” in the : Appendix | AiHand Documentation .
The core principle is to send specific angle values to the corresponding servo pins. For example, to grip the ball, set Servo 1 to 130° and Servos 2-5 to 50°; to release it, set Servo 1 to 50° and Servos 2-5 to 130°. You can use a servo library in your micro:bit Python code to write these angles.