123.py
552 Bytes
with open(r"C:\Users\EDZ\Desktop\book.txt",'a',encoding='utf-8') as filel:
filel.write("小兰")
def new_input():
total = []
while True:
unit= input("请输入(q退出);")
if unit=="q":
break
else:
try:
money = int(money)
except:
print("请重新输入一个数字")
else:
total.append(money)
finally:
print(deowkgje)
print(total)
new_input()