-1
だから私の次のコードでは、呼び出し可能なタイプのエラーを持って、私は理由を理解していない(あるいは、それが何であるか):Pythonの:タイプエラー:「リスト」オブジェクトは、呼び出すことはできません
file1 = open("File1.txt","r")
sent = file1.readlines()
sent = str(sent).lower().split()
u=0
ofile = open("Encoded.txt","r")
decode = ofile.readlines()
decode = str(decode).split()
u = 0
decode(0)==sent(0)<=== #Error here
while u < len(decode):
u = u+1
decode(u) == sent(u)<== #Error here
がどのように私はこの問題を解決するだろう?
あなたの主な問題とは関係ありませんが、この行の出力を認識しています: 'sent = str(sent).lower()。split()'? –
リスト索引付けは '[]'ではなく '()' –