Commit ea4c72de by BellCodeEditor

save project

parent c35f3f63
Showing with 11 additions and 4 deletions
def a(): def s():
total = [] total = []
while True: while True:
unit= input('请输入:(q退出):') unit= input('请输入:(q退出):')
...@@ -6,5 +6,12 @@ def a(): ...@@ -6,5 +6,12 @@ def a():
break break
else: else:
total.append(unit) total.append(unit)
print(total) print(total)
a() return total
\ No newline at end of file del a(s)
k=0
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