Python platform.platform()














































Python platform.platform()



Description: 
        The platform() function is used to retrieve the information about the system in which the program is being executed. This function returns a string.

Syntax:
platform.platform(aliased, terse)

Both the arguments are optional.
If aliased is true, It reports a system name that is different from their common name. It uses another system_alias() function to implement.
If terse if true, It returns the minimum information used to identify the running platform in a form of string.


Example 1: Program to display the platform's Information.
#import module
import platform
#displaying platform's information
print("Current platform is:",platform.platform())

Output:    

Example 2: Program to display the platform's Information by passing terse argument.
#import module
import platform
#passing terse argument true
print("Current platform is:",platform.platform(terse=True))

Output:  



Comments