Commit 1c0a3add by BellCodeEditor

save project

parent f5e50012
Showing with 6 additions and 3 deletions
...@@ -2,7 +2,7 @@ def new_input(): ...@@ -2,7 +2,7 @@ def new_input():
total = [] total = []
while True: while True:
unit = input('请输入(Q退出):') unit = input('请输入(Q退出):')
if unit ==' Q': if unit =='Q':
break break
else: else:
try: try:
...@@ -12,4 +12,7 @@ def new_input(): ...@@ -12,4 +12,7 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
print(total) print(total)
\ No newline at end of file
new_input()
\ 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