同目录中直接with open (r'./user_comment.txt'...就好了,你这个错误是没找着对应文件看看绝对路径和相对路径的关系https://www.cnblogs.com/zhuomou/p/9912499.html
with open (r'./user_comment.txt