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:
for i in file:
if "zhangsifan" in i:
print("shaixiaohuo")
\ No newline at end of file
a=["小王",29,"小李",31,"小张",45]
name="小赵"
x=67
for i in range(len(a)):
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