python 根据uuid获取mac地址

import uuid


def get_mac_address():
    node = uuid.getnode()
    mac = uuid.UUID(int=node).hex[-12:]
    print(mac)
    return mac


get_mac_address()
原文地址:https://www.cnblogs.com/wt7018/p/13255172.html