Identify your operating system in Python using sys.platform. Easily write cross-platform code with OS-specific functionality for Windows, macOS, and Linux.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok