Open goodcode-200 opened 5 years ago
这样代码一换行就错了,看起来很扎眼。没有了美感,博主快把主题中代码段换回默认的呀
还有 这个文本段可以有换行的,不然,读起来不方便
def main(): print("正在创建对象列表,请等待...........") obj_list = Search_each_Per() #下面对结果按发表次数做降序处理 print("下面对结果按发表次数做降序处理...") obj_list.sort(key = lambda obj:obj.times,reverse = True) # 将结果写入text文本中 print("将结果写入text文本中,请耐心等待...") path = os.getcwd() filename = path + "读者作者结果2.txt" new = open(filename,"w",errors="ignore") #处理非法字符 illegal multibyte sequence for i in obj_list: author = i.name times = i.times print(author) print(times) if author == None: new.write("None" +"\t" + str(times) + "\n") else: new.write(author +"\t" + str(times) + "\n") new.close() print("完成统计")
这样是正常的,换手机屏幕尺寸也合适
博主可不可以告诉我在哪里可以更改?我太菜了,找不到,哈哈
这样代码一换行就错了,看起来很扎眼。没有了美感,博主快把主题中代码段换回默认的呀
还有 这个文本段可以有换行的,不然,读起来不方便
这样是正常的,换手机屏幕尺寸也合适