Commit 6fa4a4bc by BellCodeEditor

save project

parent 37db6749
Showing with 10 additions and 6 deletions
# 勇于挑战的创造师,请运行下面的代码,观察运行结果,和小伙伴们说说你的发现?
name='sunzi'
power=32
h=['xuansun',28,'zengsun',31,'erzi',36,'wo',56,'baba',88]
for i in range(len(h)):
if i%2==1 and h[i]>=power:
h.insert(i-1,name)
h.insert(i,power)
break
print(h)
b=['袁术','公孙瓒','关羽','张飞','刘备','曹操']
b[2:5]
print(b)
\ 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