我无能为力,为什么这段代码不起作用:
def WordsProbs (file_name):
with open (file_name, encoding = "utf-8") as f1:
each_line_numbers = [len(set(word_tokenizer(line.split(None, 1)[0]))) for line in f1)
return each_line_numbers
它命中switch (Category.getValue()) {
case 1: () => { for (var i = 0; i < 12; i++) OptionSet.addOption(options[i]); }; break;
default: () => { OptionSet.clearOptions(); }; break;
}
,但之后不再执行循环,只退出switch语句。