Python & Arduino communication with serial port

You can send and parse numbers a character at a time, like "12345d" for a delay of 12345.

Look at the pcRead example:

and some of the linked Wokwi simulations:

This does a lot with single character-at-a-time processing: