Commit f8f4e394 by BellCodeEditor

save project

parent 09678775
Showing with 9 additions and 6 deletions
total = []
def myinput():
total = [] #定义一个列表,叫total
def myinput(): #定义一个函数,叫myinput
while True:
b=0
unit= input("请输入:")
if unit== 'QQ':
break
try:
b=int(unit)
except:
if (unit == 'q'):
return
else:
total.append(unit)
print(total)
myinput()
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