I have this simple environment set script in Python:
import os
os.environ['API_USER'] = 'SuperUser'
os.environ['API_PASSWORD'] = 'SuperPass'
USER = os.environ.get('API_USER')
PASSWORD = os.environ.get('API_PASSWORD')
print(USER)
print(PASSWORD)
When I run it I get this:
SuperUser
SuperPass
So far OK, but when I comment out two lines where I set user and pass and run it again, I get this:
None
None
Why those two environment variable are removed and are not saved? I was wondering, that once I set some environment variable, I can use it again later without setting it again (until I delete them), right? What is wrong? Thank you!