In the same folder, I have an .env
file and a main.py
file.
In .env
I have set
TOKEN = 123456
And in main.py
I have
import os
print(os.getenv('TOKEN'))
When I run the Python script, I get None
in the standard output. What am I doing wrong?
I have looked at all the similar questions but it seems like I'm not missing any steps. I'm using MacOS if that affects anything.
Thanks in advance!