What is platform.uname() in Python?
Method signature
Let’s view the method signature.
uname()
Parameters
This method takes no parameters.
Code
Let’s view the code for this method.
import platformprint("platform.uname() =", platform.uname())
Explanation
- Line 1: We import the
platformmodule. - Line 3: We retrieve the system’s uname using the
uname()method.