Answers for "what is environment variables used for in python"

9

python create environment variable

import os
os.environ['variable_name'] = 'variable_value'
Posted by: Guest on April-28-2020
0

env variables python .env

import os

print(os.environ.get('TYPE'))
print(os.environ.get('PORT'))
Posted by: Guest on June-07-2021

Code answers related to "what is environment variables used for in python"

Python Answers by Framework

Browse Popular Code Answers by Language