这个代码不知道哪里错了 想知道怎么改

输入一句话和n
输出字母数为n的所有单词
Input: hello world, nice to see you.
Input: 5
Output:hello world


import string
punc=string.punctuation
space_=' '*len(punc)
sentence=input()
sentence=sentence.lower()
table=' '.maketrans(punc,space_)
sentence=sentence.translate(table)
sentence=list(map(str,sentence.split(' ')))
n=int(input())
for i in range(len(sentence)):
    if len(sentence[i])==n:
       print(sentence[i],end=' ')

img


我直接赋值
没发现啥错呀。 你说的错误是指什么? 截个图看看。