Python & Arduino communication with serial port

Multiple character commands are more difficult to use because of the timing of serial data transfer. If you change your “10” command into a single character (‘a’ perhaps?) it should work.

If you really need multiple character parsing look for the “serial input basics” tutorial.