次のコードの "lijst2 = lijst + [cat]" 行で "unexpected indent" というエラーが表示され続けます。私が見る限り、インデントは正しいように見えるので、理由はわかりませんか? 私は初心者であることを覚えておいてください。ありがとうございました!これは私のコードです:
for fileid in corpus.fileids():
tekst1 = corpus.words(fileid)
instantie = defaultdict(float)
cat = mijn_corpus.fileids()
for word in tekst1:
if word in freq:
instantie[word] +=1
for word in freq:
if word not in tekst1:
instantie[word] +=0
lijst1 = []
for key, value in instantie.iteritems():
lijst1.append(value)
lijst2 = lijst + [cat] # Here I get the error message: unexpected indent
resultaten.writerrow(lijst2)