Commit ee4edb13 by BellCodeEditor

auto save

parent 3848d4f3
Showing with 11 additions and 5 deletions
with open (r"C:\Users\PC\Desktop\123\zhangxiaofan.txt","r",encoding="utf-8") as file: a=["小王",29,"小李",31,"小张",45]
for i in file: name="小赵"
if "zhangsifan" in i: x=67
print("shaixiaohuo") for i in range(len(a)):
\ No newline at end of file print(a[i])
if i%2==1 and a[i]>=x:
a.insert(i-1,name)
a.insert(i,x)
break
print(a[:-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