Commit 6641cc86 by BellCodeEditor

auto save

parent f449a46f
Showing with 12 additions and 7 deletions
def new_input():
total = []
list1 = []
while True:
unit= input("请输入:")
if unit== 'q':
nuit = input("请输入:")
if nuit == 'q':
break
else:
total.append(unit)
print(total)
new_input()
\ No newline at end of file
try:
nuit = int(nuit)
except:
print("请输入数字,不是非数字:")
else:
list1.append(nuit)
print('-'*30)
print(list1)
new_input()
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