Commit b6e18287 by BellCodeEditor

auto save

parent 2cce90b5
Showing with 5 additions and 32 deletions
#total = []
#while True:
# unit= input("请输入:")
# if unit== 'w':
# break
# else:
# total.append(unit)
#print(total)
#while True:
# try:
# unit = int(input('请输入价格?'))
# total.append(unit)
# except:
# print("请输入数字")
# else:
# if unit=='w'
# total.append(unit)
#print(total)
def new_input():
total = []
white True:
unit= input('请输入单价(q退出) : ')
if unit=='q':
total = []
while True:
unit= input("请输入: ")
if unit== 'w':
break
else:
try:
unit= int(unit)
except:
print("请重新输入数字")
else:
total.append(unit)
finally:
print("-"*30)
print(total)
\ No newline at end of file
print(total)
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