For purpose of creating bulk virtual machines, I need to create a random MAC address generator in Python. I don\'t know how to generate random MAC addresses.
Is the foll
Modified from mamofish's code to Python3:
mac = '00:00:00:' for number in range(16**6): hex_num = hex(number)[2:].zfill(6) print("{}{}{}:{}{}:{}{}".format(mac,*hex_num))
Generates mac addresses as strings from 00:00:00:00:00:00 to 00:00:00:ff:ff:ff.
00:00:00:00:00:00
00:00:00:ff:ff:ff