#ran in python 3.8.x cmd = "ls" cmd_args = "-l" subprocess.run([cmd, cmd_args])
Here is what the above code is Doing:
1. It’s creating a variable called cmd and assigning the value ls to it.
2. It’s creating a variable called cmd_args and assigning the value -l to it.
3. It’s running the command ls -l using the subprocess.run() function.