Commit 75d7b8e4 by BellCodeEditor

save project

parent 46c74c8f
Showing with 9 additions and 4 deletions
def a(): def s():
total = [] total = []
while True: while True:
unit= input('请输入:(q退出):') unit= input('请输入:(q退出):')
...@@ -8,5 +8,10 @@ def a(): ...@@ -8,5 +8,10 @@ def a():
total.append(unit) total.append(unit)
print(total) print(total)
return total return total
s=a() del a(s)
print(a) k=0
\ No newline at end of file for i in s:
k=k+i
return k
f=k()
print(f)
\ 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