From the documentation:
If the platform supports the unsetenv() function, you can delete items in this mapping to unset environment varia
unsetenv()
You can still delete items from the mapping, but it will not really delete the variable from the environment if unsetenv() is not available.
del os.environ['MYVAR']