They are basically the same. The call() method returns the return code of the executed command.
Ref: https://docs.python.org/3/library/subpro...-level-api
retcode = subprocess.call(['ls', '-l']) print(retcode)
Output:0
You can do the same with run() method but the return code is as an attribute to the returned object:subprocess.run(['ls', '-l']).returncodeSame output
Ref: https://docs.python.org/3/library/subpro...-level-api