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()
我可以輸入任何東西,只是例如,這讓我回來,我把同樣的事情。也許這是愚蠢的東西,但我無法弄清楚。假設我想讓它說不好,我會輸入112111114.它應該給我不好,但它不會。這爲什麼不工作?
你是否從另一種語言翻譯過此內容? – 2010-05-11 22:55:49