import network # Initialize the network interface wlan = network.WLAN(network.STA_IF) # Activate the interface wlan.active(True) # Get the MAC address mac_address = wlan.config('mac') print("MAC Address:", mac_address)