Get List of All Environment Variables using Python

os.environ object

import os

envVars = dict(os.environ)

print(envVars)

Leave a Comment

Cancel reply

Your email address will not be published.