The platform module in Python is used to access the underlying platform’s data,such as, hardware, operating system, and interpreter version information.The platform module includes tools to see the platform’s hardware, operating system, and interpreter version information where the program is running.
returns a single string identifying the underlying platform with as much useful information as possible.
returns the system’s release, e.g. '2.2.0' or 'NT'
returns the system/OS name, e.g. 'Linux', 'Windows', or 'Java'.
returns the system’s release version, e.g. '#3 on degas'
import sys
import platform
import os
print("OS Type :- " + os.name)
print("Kernel :- " + platform.system())
print("Release Version :- " + platform.release())
print("All kernel & version details :- " + platform.version())
print("Kernel + version :- " + platform.platform())
OS Type :- nt
Kernel :- Windows
Release Version :- 10
All kernel & version details :- 10.0.18362
Kernel + version :- Windows-10-10.0.18362-SP0