Commit 1b7196ea by BellCodeEditor

save project

parent 34a1c4ca
Showing with 4 additions and 1 deletions
...@@ -12,7 +12,7 @@ def new_input(): ...@@ -12,7 +12,7 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
return(total) return(total)
# 求列表之和
def sum(a): def sum(a):
count=0 count=0
for i in a: for i in a:
...@@ -24,3 +24,5 @@ def sum(a): ...@@ -24,3 +24,5 @@ def sum(a):
d=new_input() d=new_input()
print(d) print(d)
a=sum(d)
print(a)
\ 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