The os module provides an interface to determine what type of operating system the code is currently running on.

os.name

This can return one of the following in Python 3:

More detailed information can be retrieved from [sys.platform](<https://docs.python.org/3/library/sys.html#sys.platform>)