Here is my code and output:
>>> import os
>>> url = os.environ['REQUEST_URI']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'REQUEST_URI'
The browser is Microsoft Edge on Windows 10 Home. The Python interpreter was bundled with Visual Studio.
I have seen How to get current URL in python web page?