Commit f8f4e394 by BellCodeEditor

save project

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