TABERROR
File "(Path)\DETS.PY",
line 271
res = (int(res, 2))
我:
- 替換了所有卡口與4個空格
- 經過是否有真正4個空格的地方
代碼:
def uncode(list,line):
file = open(list+'.txt','r')
temp = ''
res = ''
if line >= 3:
for i in range(1,line):
file.readline()
elif line == 2:
file.readline()
for i in file.readline():
temp = temp + i
if len(temp) == 2:
res = res + trans[temp]
temp = ''
**res = (int(res, 2))**
return res
def uncode2(list,line):
fffiile = open('a'+list+'.txt','r')
temp = ''
res = ''
if line >= 3:
for i in range(1,line):
fffiile.readline()
elif line == 2:
fffiile.readline()
for i in fffiile.readline():
temp = temp + i
if len(temp) == 2:
res = res + temp
temp = ''
res = (int(res, 2))
return **res**
我想說'請給我們看代碼',但後來決定不這樣做。 – ForceBru 2015-03-31 15:00:21
@ForceBru哈哈XD剛剛編輯我的帖子:) – 2015-03-31 15:20:52
環繞'res'和'res = ...'的星號無效 – ForceBru 2015-03-31 15:24:06