Commit 7d3f6b20 by BellCodeEditor

auto save

parent c1b1432c
Showing with 14 additions and 0 deletions
goods = ["水壶", "绷带", "望远镜", "维生素", "饼干", "定位器", "止痛药"]
i = 0
while i<len(goods):
if goods[i]=="定位器":# 如果列表goods里取出的内容等于"定位器"
goods.pop(i) # 删除定位器
i = i+1
print(goods)
\ No newline at end of file
file=open(r'c:\Users\Administrator\Desktop\TEXT1.TXT','w',encoding="utf-8")
file.write("li:9")
file.close()
\ 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