Commit 5e7737c5 by BellCodeEditor

auto save

parent d97da671
Showing with 6 additions and 3 deletions
...@@ -8,8 +8,11 @@ for i in range(len(hero)): ...@@ -8,8 +8,11 @@ for i in range(len(hero)):
if i%2==1 and hero[i]>=power: if i%2==1 and hero[i]>=power:
hero.insert(i-1,name) hero.insert(i-1,name)
hero.insert(i,power) hero.insert(i,power)
#added by teacher, add break
break
print(hero) print(hero)
#added by teacher #added by teacher
print('i =',i) print('i =',i)
print('len =',len(hero)) print('len =',len(hero))
\ No newline at end of file #臂力大王
print("臂力大王是:",hero[-7:-1])
\ 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