The platform
module in Python provides functions that access information of the underlying platform (the operating system).
The platform.machine()
method is used to return the machine type of the underlying platform. For example, i386, i686, x86_64.
machine()
This method has no parameters.
The return type will be a machine type or an empty string
.
import platformprint("platform.machine() = %s" % (platform.machine()))
platform
module.machine()
method.