Why doesn't this work?
- by Kyle W
take = raw_input('Please enter the string of numbers that compose code\n\n\t')
y = str(take)
l = []
for i in xrange(0, len(y), 3):
l.append(str(y[i:i+3]))
b = len(l)
a = 0
while(a!=b):
c = l[a].replace('444', ' ')
c = l[a].replace('111', 'a')
c = l[a].replace('112', 'b')
c = l[a].replace('113', 'c')
c = l[a].replace('114', 'd')
c = l[a].replace('115', 'e')
etc...
a = a + 1
filename = 'decmes.txt'
file = open(filename, 'w')
file.write(c)
file.close()
I can enter anything, just 111 for example and it gives me back the same thing I put in. Maybe it's something dumb, but I can't figure it out.