The os module provides the environment variables of the system as bytes(through os.environb) or as Unicode strings(through os.environ), except for the Windows operating system. In Windows, the collection of environment variables are dealt as Unicode strings(wchar_t of the windows operating system being the underlying). This behaviour is reflected through boolean flag supports_bytes_environ. The flag is set to False for Windows and assigned True otherwise. This is a low-level implementation detail which may change.
# Example program that demonstrates the usage of the
print("Name of the os:%s"%os.name);
Name of the os:posix
Does the os support environment variables as bytes:1
Type of an item from the environment: