Skip to content
C

Environment Variable Loader

Easypython

Create a .env file containing a sample API_KEY, then load it using python-dotenv and print its value — without ever hardcoding the key in the script.

Approach: write the given key to a local .env file, call load_dotenv() to load it into the process environment, then read it back with os.environ.get() and print it.

Input: One line: the API key value to store.

Output: One line: the API key value, read back from the environment (not hardcoded).

Input (stdin)

Output

Run your code to see output here...