import subprocess
from subprocess import PIPE

proc = subprocess.run("date", shell=True, stdout=PIPE, stderr=PIPE, text=True)
date = proc.stdout
print('STDOUT: {}'.format(date))
2d22be0fa66c853a17ee9abbf9d6da00846849c9
<mask token>

<mask token>
print('STDOUT: {}'.format(date))

<mask token>
proc = subprocess.run('date', shell=True, stdout=PIPE, stderr=PIPE, text=True)
date = proc.stdout
print('STDOUT: {}'.format(date))

import subprocess
from subprocess import PIPE
proc = subprocess.run('date', shell=True, stdout=PIPE, stderr=PIPE, text=True)
date = proc.stdout
print('STDOUT: {}'.format(date))

import subprocess
from subprocess import PIPE

proc = subprocess.run("date", shell=True, stdout=PIPE, stderr=PIPE, text=True)
date = proc.stdout
print('STDOUT: {}'.format(date))