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))
Error
TypeError: object of type 'NoneType' has no len()
I want to practise the function "map". But it seems that I made a mistake when I use len().