Commit 1a7f4702 by BellCodeEditor

save project

parent 81ef3988
Showing with 8 additions and 17 deletions
def new_input(): def new_inout():
total = [] total = []
while True: while True:
try: u=input("请输入:")
a=int(input("请输入:")) if u=="q":
except:
print("请输入数字")
if a== 'q':
break break
else: else:
total.append(a)
print(total)
new_input()def new_input():
total = []
while True:
try: try:
a=int(input("请输入:")) a=int(u)
except: except:
print("请输入数字") print("请输入数字")
if a== 'q':
break
else: else:
total.append(a) total.append(a)
print(total) return total
new_inp c=new_inout()
\ No newline at end of file print(c)
\ 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