简体   繁体   English

为什么第二个 output 打印的是 NONE 列表而不是句子?我做错了吗?

[英]Why is the second output printing a list of NONE instead of a sentence?Have I done any mistake?

the output keeps on giving me a list of NONE output 不断给我一个无列表在此处输入图像描述

Your clean sentence function can return two things.你干净的句子 function 可以返回两件事。 If stopwords is set to true, returns sentence.如果stopwords设置为 true,则返回句子。 If not, it returns the default value, None .如果不是,则返回默认值None Fix this loophole and you'll get your correct result.修复这个漏洞,你会得到正确的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM