When you get an error telling you that a parameter is missing or invalid, then you should go immediately to the documentation to find out why:
subprocess — Subprocess management — Python 3.10.6 documentation[
^].
You also seem to be trying to run two different things. In the Python code you are trying to execute a Linux/UNIX
ls
shell command. In the (I assume C#) code you are trying to exec a string of Python text.
And it is not clear which of these you want to capture.