Hello,
pls can anybody help me to break following string?
example:
output is 000 (type str) an I need to get [0,0,0]
here is a script:
def test(n_input):
bin_n=2
r=bin_n**n_input
## print r
for x in range(r):
## print bin(x)
f=str(bin(x))[2:].zfill(n_input) # x is type int, f is type str
print type(f)
result is:
000
001
010
011
100
101
110
111