diff --git a/工具v4/批量收录新题.py b/工具v4/批量收录新题.py index d249b8e0..fba6d90f 100644 --- a/工具v4/批量收录新题.py +++ b/工具v4/批量收录新题.py @@ -63,7 +63,7 @@ class MyWindow_bdsl(QWidget,Ui_Form): psrstring = "rep"+id+"," elif simrate > 0.5: psrstring += id + "," - if psrstring[-1] == ",": + if len(psrstring) > 0 and psrstring[-1] == ",": psrstring = psrstring[:-1] if len(psrstring) > 0: output += f"\\item [{psrstring}] {p}\n\n"