Commit a0b8ce08 by BellCodeEditor

save project

parent 3812a710
Showing with 9 additions and 17 deletions
def new_input(): def lk_input():
total = [] total = []
while True: while True:
unit = input('请输入(q退出):') try:
if unit == 'q': unit= input("请输入(q退出):")
break ex
else: if unit== 'q':
try: break
unit = int(unit)
except:
print("请重新输入一个数字")
else: else:
total.append(unit) total.append(unit)
print("-"*30) print(total)
return total lk_input()
\ No newline at end of file
result = new_input()
print(result)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment