Es gibt in der Arduino-IDE ein paar Beispiele dazu
Datei -> Beispiele -> 04.Communication -> SerialCommunicationASCII

Python: pyserial