この関数を作成しましたが、アサーション エラーが発生し続け、その理由がわかりませんか???
def amino(codonfile, DNA):
"""This function reads the 64-line codon file and then converts the DNA string entered into an amino acid string."""
codonfile = []
for line in codonfile:
x,y = line.split()
if DNA == dict[x]:
return dict[y]
codonfile = open("codon.txt","r")
codonfile.close
assert(amino("codon.txt","TTT")== "Phe")
assert(amino("codon.txt","TTATTCTTGTCT")== "LeuPheLeuSer")
assert(amino("codon.txt","TTAGGGCCCTAC")== "LueGlyProTyr")
print("passed")