A Python snippet using two EV3 bricks, a touch sensor, a motor, and Pybricks. Pybricks is the LEGO recommended method of using the LEGO EV3 Brick with Python. See the official Python for EV3 LEGO page for more details.
This example connects two EV3 bricks over Bluetooth. When the touch sensor is pushed on the sever EV3 brick the motor on the client EV3 brick turns.