Commit 2eaf9807 by BellCodeEditor

save project

parent 8957f091
Showing with 23 additions and 9 deletions
total = [] def who():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': unit= input("请输入:")
break try:
else: unit=int(unit)
total.append(unit) except:
print(total) if unit== 'q':
\ No newline at end of file break
else:
total.append(unit)
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