Snippets Collections
# How to extract the mac address of a computer
import uuid

print("The MAC address in formatted way is : ", end="")

print(':'.join(['{:02x}'.format((uuid.getnode() >> elements) & 0xff)
for elements in range(0, 8*6, 8)][::-1]))

star

Fri Sep 17 2021 01:21:48 GMT+0000 (Coordinated Universal Time)

#python #macaddress

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension