I have a list of words . I wants to filter out words which do not have minimum length. I tried filter, but showing some error . My code is
def words_to_integer(x,y):
return len(x)> y
print("enter the list of words : ")
listofwords = [ str(x) for x in input().split()] #list of words
minimumlength = print("enter the length ")
z = list(filter(words_to_integer,(listofwords,minimumlength)))
print("words with length greater than ",minimumlength ,"are" ,z )
error is
z = list(filter(words_to_integer,(listofwords,minimumlength)))
TypeError: words_to_integer() missing 1 required positional argument: 'y'