Commit fe199623 by BellCodeEditor

auto save

parent 7869c712
Showing with 23 additions and 8 deletions
with open(r"D:\book.txt","w",encoding="utf-8")as hgfyhgtyhgfty:
hgfyhgtyhgfty.write("悟空 12 13 14\n")
hgfyhgtyhgfty.write("小贝 15 16 17\n")
hgfyhgtyhgfty.write("诺依 18 19 20\n")
with open(r"D:\book.txt","r",encoding="utf-8")as ghjfhbgdhjh:
hgfyhgtyhgfty=ghjfhbgdhjh.readlines()
for i in hgfyhgtyhgfty:
hgfyhgtyhgfty=i.split()
print(i[0])
print(i[1:])
with open(r"c:\Users\Administrator\Desktop\sales_list.txt","r",encoding="utf-8")as file1:
s=file1.readlines()
# print(s)
for i in s:
# print(i)
y=i.split()
# print(y[0])
print(y[1:])
with open(r"D:\book.txt","w",encoding="utf-8")as hgj:
hgj.write("悟空 12 13 14\n")
hgj.write("小贝 15 16 17\n")
hgj.write("诺依 18 19 20\n")
with open(r"D:\book.txt","r",encoding="utf-8")as hjgfsdy:
j=hjgfsdy.readlines()
for ghfg in j:
j=ghfg.split()
print(j[0])
print(j[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