以下是我尝试在名为的方法中读取文本文件中的文本的代码 check_keyword()
def check_keyword():
with open(unknown.txt, "r") as text_file:
unknown = text_file.readlines()
return unknown
这就是我调用该方法的方式:
dataanalysis.category_analysis.check_keyword()
文本文件中的文本:
Hello this is a new text file
上述方法没有输出:((
动漫人物
随时随地看视频慕课网APP
相关分类