-2
words = [ 'look', 'into', 'my', 'eyes', 'look', 'into', 'my', 'eyes', 'the', 'eyes', 'the', 'eyes', 'the', 'eyes', 'not', 'around', 'the', 'eyes',"don't", 'look', 'around', 'the', 'eyes', 'look', 'into', 'my', 'eyes', "you're", 'under']
def requirement(word):
onelist = []
if word in words:
return(len(onelist.append(word)))
print(map(requirement('look'), words))
FehlerWarum bekomme ich einen "TypeError: Objekt vom Typ 'NoneType' hat keine len()"?
TypeError: object of type 'NoneType' has no len()
ich die Funktion "Karte" üben möchten. Aber es scheint, dass ich einen Fehler gemacht habe, wenn ich len() benutze.
Sie ' re Aufruf 'len' auf die Funktion' list.append', nicht auf 'onelist'.You ned den' list.append' Anruf aus dem 'len' Anruf zu trennen. –
@Coal_ Nur aus Neugier, wie hast du ein kodiertes Apostroph im Kommentar? – Carcigenicate
Ich habe keine Ahnung, ich bin sowieso auf der App, könnte ein Bug sein :) –