try: def er(): total = [] while True: unit= input("请输入:") if unit== 'q': break else: total.append(unit) print(total) er() except: print("78")