Problem with the system cannot find the file specified

Hey :), I am currently following the python tutorial by mosh. And i am following along 9. Python standard library 17- Running external programs
but when I try to ruin this code:
import subprocess[“dir”])

I get the following error message:

Can somebody explain to me what the problem is :)?

dir is not an executable that you can run. It’s a command of the executable cmd.exe that you can call by passing /c and dir to it.

It’s been some time since I last did Python but I think["cmd", "/c", "dir"] should do the job.

Okay perfect,
thank you very much :)!