For Windows OS

platform.win32_ver()

This function returns a tuple containing additional information about Windows OS such as OS release, version number, service pack, OS type(single/ multi processor). The output is in the following format:

(release, version, csd, ptype)

where csd is service pack and ptype is OS type.



Platform Module in Python

Python defines an in-built module platform that provides system information.

The Platform module is used to retrieve as much possible information about the platform on which the program is being currently executed. Now by platform info, it means information about the device, it’s OS, node, OS version, Python version, etc. This module plays a crucial role when you want to check whether your program is compatible with the python version installed on a particular system or whether the hardware specifications meet the requirements of your program.
This module already exists in the python library and does not require any installation using pip.

It can be imported using the following syntax:

import platform

Example 1: Displaying the platform processor




# Python program to display platform processor
  
# import module
import platform
  
# displaying platform processor
print('Platform processor:', platform.processor())


Output:

Similar Reads

Platform Functions

platform.architecture()...

For Mac OS

platform.mac_ver()...

For Unix OS

platform.libc_ver()...

For Windows OS

platform.win32_ver()...

Contact Us