xxxxxxxxxx
# Python Program to compute
# MAC address of host
# using UUID module
import uuid
# printing the value of unique MAC
# address using uuid and getnode() function
print (hex(uuid.getnode()))
xxxxxxxxxx
import uuid
mac_address_int = uuid.getnode() # Get hardware address as 48-bit positive int
mac_address_hex = hex(mac_address_int) # Create hexadecimal version of mac address
print("MAC address:", mac_address_hex) # MAC address: 0x00005e0053af