Commit 2eaf9807 by BellCodeEditor

save project

parent 8957f091
Showing with 18 additions and 4 deletions
total = []
while True:
def who():
total = []
while True:
unit= input("请输入:")
try:
unit=int(unit)
except:
if unit== 'q':
break
else:
total.append(unit)
print(total)
\ No newline at end of file
return total
list1=who()
print(list1)
def can(shu):
see=0
for i in shu:
see=see+i
return see
list2=can(list1)
print(list2)
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