im trying to make a python script that lets me input commands into the minecraft server.
I'm having issues with multiple commands

I want it to run "say test" "list" "save-all" separately but instead, it just runs "say testlistsave-all"
You never write the ENTER key.
Do do that, you have to write a newline char \n at the end of each command. (Source)
So, you will have something like that:
MCser.stdin.write(b'say test\n')
MCser.stdin.write(b'list\n')
MCser.stdin.write(b'save-all\n')
You can something like that to run command easier:
def runcmd(mycmd):
MCser.stdin.write(mycmd)
MCser.stdin.write(b'\n')
runcmd(b'say test')
runcmd(b'list')
runcmd(b'save-all')
\n) at the end of each command string.