ser = serial.Serial(
ser.write("hello" + "\n")
the above sample code best describes how to write or read from a serial port using python - pyserial library. This is not the best of the solutions available out there but def simple (probably the simplest :) ). you could do more digging into the serial library too if you would like.
Like I always say happy scripting !!!