-
Notifications
You must be signed in to change notification settings - Fork 0
/
ListShuffler.py
executable file
·26 lines (22 loc) · 879 Bytes
/
ListShuffler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
"""
Create a random distribution of nibbles with exactly
4 of each of the 16 possible values and output as a
comma delimited string
Implementation (c) 2017 Brig Young (github.com/Sonophoto)
License: BSD-2c, i.e. Cite.
"""
import random as shuffler
shufflee = [
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
]
shuffler.shuffle(shufflee)
shuffled_hex = ", ".join(str(hex(x)) for x in shufflee)
print(shuffled_hex, "\n")