Posted inPython modules sys
Identifying Operating System with sys.platform
Identify your operating system in Python using sys.platform. Easily write cross-platform code with OS-specific functionality for Windows, macOS, and Linux.
The ultimate Python guide