import sys
import os
import subprocess
app_name = sys.argv[1]
s = subprocess.call(
"docker ps --filter name=$app_name| awk '{print $2}' > docker_tag.txt",
shell=True
)
How can I access the value of the variable inside subprocess.call().