func.py 264 Bytes Edit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 total = [] while True: unit= input("q退出:") if unit== 'q': break else: total.append(unit) print(total) except: print("请重新输入一个数字") else; total.append(unit) print("-"*30) retum tot