get all possible single bytes in python -
I test for a machine learning algorithm (8-3-8 mural network encoder) to generate all possible bytes I am trying to Is there a way to do this in dragon without doing 8 loops?
What settings can help?
I would prefer a great way to do this, but what can I get at this time.
desired output:
[0,0,0,0,0,0,0,0,0,0] [0,0,0, 0,0, 0,0,1] [0,0,0,0,0,0,1,0] [0,0,0,0,0,0,1,1] [0,0,0, 0,0 , 1,0,0] [0,0,0,0,0,1,0,1]. . [1,1,1,1,1,1]
Yes, There is:
import itertools itertools.product ([0, 1], repeat = 8) & gt; & Gt; & Gt; List (itertools.product ([0, 1], repeat = 8)) [(0, 0, 0, 0, 0, 0, 0, 0), (0, 0, 0, 0, 0, 0, 0) , 1), [...]
(1, 1, 1, 1, 1, 1, 1, 0), (1 , 1, 1, 1, 1, 1, 1, 1)]
Comments
Post a Comment