The platform
module in Python provides functions that access information of the underlying platform (operating system).
The platform.release()
method is used to return the underlying operating system release. Compared to the platform.version()
method, this method returns a simpler string indicating only the release of the operating system. This method returns an empty string if it’s not able to determine the operating system release.
platform.release()
This method takes no parameters.
This method returns the underlying system’s release.
import platformprint("platform.release() = %s" % (platform.release()))
platform
module.release()
method.