func.py
476 Bytes
def new_input():
total=[]
while True:
unit= input('请输入(q退出)=')
if unit=='q':
break
else:
try:
unit=int(unit)
except:
pring('回复库头发')
else:
total.append(unit)
finally/:
print("=====================================")
reture total
total.append(unit)
print(total)
new_input()