Skip to content

Instantly share code, notes, and snippets.

@ulikoehler
Created January 10, 2017 21:53
Show Gist options
  • Save ulikoehler/03fbda5fa083ec868a7a48109ec6378c to your computer and use it in GitHub Desktop.
Save ulikoehler/03fbda5fa083ec868a7a48109ec6378c to your computer and use it in GitHub Desktop.
Generate a random 64-bit EUI for Python
#!/usr/bin/env python3
import random
print("bytes([{},{},{},{},{},{},{},{}])".format(
*[random.randint(0,255) for i in range(8)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment