Commit 1fa1aeb0 by BellCodeEditor

save project

parent 8c34406c
Showing with 10 additions and 8 deletions
...@@ -2,13 +2,15 @@ def abcdefg(): ...@@ -2,13 +2,15 @@ def abcdefg():
total = [] total = []
while True: while True:
try: try:
unit= int(input("请输入:")) unit=input("请输入:")
if unit== 'q':
break
unit=int(unit)
except: except:
print("Do you wanna have a bad time?") print("Do you wanna have a bad time?")
else: else:
if unit== 'q': total.append(unit)
break print(total)
else: return total
total.append(unit) a=abcdefg()
print(total) print(a)
abcdefg() \ No newline at end of file
\ 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