examples/os/set_env.py
from __future__ import print_function
import os

os.system("echo hello")
os.system("echo $HOME")

os.system("echo Before $MY_TEST")
os.environ['MY_TEST'] = 'qqrq'
os.system("echo After $MY_TEST")

We can change the environment variables and that change will be visible in subprocesses, but once we exit from ou Python program, the change will not persist.