Created
March 9, 2020 16:51
-
-
Save MinaGabriel/a543d884ceee446fab9c7cd9a016dd40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def binary_data(n): | |
b = [] | |
for i in range(1 << n): | |
s = bin(i)[2:] | |
s = '0' * (n - len(s)) + s | |
b.append(map(int, list(s))) | |
return b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment