Initialize serial device
import serial
to read single byte from serial device
data = ser.read()
to read given number of bytes from the serial device
data = ser.read(size=5)
to read one line from serial device.
data = ser.readline()
to read the data from serial device while something is being written over it.
data = ser.read(ser.inWaiting())
ser.read(ser.inWaiting)
To get a list of available serial ports use
python -m serial.tools.list_ports
at a command prompt or
from serial.tools import list_ports
list_ports.comports() # Outputs list of available serial ports