Commit 5c7a3ee7 by BellCodeEditor

auto save

parent 39f29a38
Showing with 26 additions and 29 deletions
def n():
def n():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit = int(unit)
except:
print('请重输')
else:
total.append(unit)
return total
def a(qian):
sum = 0
for i in qian:
sum = sum +i
return sum
pp=n()
b=a(pp)
print(b)
\ No newline at end of file
# bros=["刘备","关羽","张飞"]
# #print(bros[1])
# #bros[0]="关羽"
# #bros[1]="刘备"
# #print(#)
#=========================================================================================
#a=['华雄']
#b=['袁术','夏侯惇','曹操','关羽']
#b.pop(3)
#print
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#a=['华雄']
#c=['颜良','文丑']
#a.extend(c)
#print([a])
#insert(c,'1')
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