The platform
module in Python provides functions that access the underlying platform’s (operating system) information.
The platform.version()
method returns the underlying operating system’s release version. This method returns an empty string if it cannot determine the operating system’s version.
platform.version()
This method has no parameters.
This method returns the underlying system’s version.
import platformprint("platform.version() = %s" % (platform.version()))
platform
module.version()
method to retrieve this version.