to answer your question - the way you define
There are different ways to construct the string, however, if you want to execute command in shell/terminal - look at subprocess.run(). Don't construct string, but pass command and arguments as list.
cmd
makes it a tuple, not string. Brackets are not required, as stated in the docs:Quote:They may be input with or without surrounding parentheses, although often parentheses are necessary anyway (if the tuple is part of a larger expression).So when you print it - you get tuple (on output tuples are always enclosed in parentheses, so that nested tuples are interpreted correctly)
There are different ways to construct the string, however, if you want to execute command in shell/terminal - look at subprocess.run(). Don't construct string, but pass command and arguments as list.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs