Commit e92530e6 by BellCodeEditor

save project

parent 58031b73
Showing with 12 additions and 5 deletions
for i in range(1,10): new=""
for j in range(1,i+1): with open(r"C:\Users\Administrator\Desktop\book.txt","r",encoding="utf-8") as file:
print(i,"*",j,"=",(i*j),end=" ") for d in file:
print() if "小兰=10本" in d:
\ No newline at end of file naw=d.replace("小兰=10本","小兰=12本")
new+=naw
with open(r"C:\Users\Administrator\Desktop\book.txt","w",encoding="utf-8") as file:
file.write(new)
with open(r"C:\Users\Administrator\Desktop\book.txt","r",encoding="utf-8") as file:
a=file.read()
print(a)
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