diy3.py 420 Bytes Edit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 def new_input(): total = [] while True: unit = input("请输入(p退出):") if unit == 'p' break else try: unit == int(unit) except: print("填数字!!!!") else: total.append(unit) finally: print("-"*30) print(total) def sum(money): count = 0