Commit d03b1f35 by BellCodeEditor

save project

parent 65d922bf
Showing with 6 additions and 4 deletions
def new_input(): def new_input():
a=[] a=[]
while True: while True:
b=(input('请输入价格:(退出请按q)'))
if b=='q':
break
else:
try: try:
b=int(input('请输入:(退出请按q)')) b=int(b)
except: except:
print('请输入整数!') print('请输入整数!')
else: else:
print('-'*30)
if b=='q':
break
a.append(b) a.append(b)
print('-'*30)
print(a) print(a)
new_input() 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