Commit d4818334 by BellCodeEditor

save project

parent faff74fd
Showing with 14 additions and 10 deletions
def func(): def func():
total = [] total = []
while True: while True:
try:
unit= int(input("请输入:")) unit= input("请输入:")
except: if unit== 'q':
print("请输入数字。") break
else: else:
if unit== 'q': try:
break unit=int(unit)
except:
print("请输入数字。")
else: else:
total.append(unit) total.append(unit)
print(total) return total
func() s=func()
\ No newline at end of file print(s)
\ 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