Commit 5593ec88 by BellCodeEditor

auto save

parent e6025c3c
Showing with 32 additions and 6 deletions
import csv
with open(r"C:\Users\EDY\Desktop\myh.csv") as f:
r=csv.reader(f)
print(list(r))
\ No newline at end of file
message = "诺依,周末一起去看动漫展吧!" # a=[["角色","血量","战斗力","元神"],["悟空","100","150","21"],["八戒","60","23","12"],["小A","80","65","12"]]
# file=open(r"C:\Users\EDY\Desktop\myh.csv","w",encoding="utf-8")
# 请对message进行遍历,取出所有元素 # for item in a:
for i in message: # file.write(",".join(item)+"\n")
print(i) # file.close()
# import csv
# file=open(r"C:\Users\EDY\Desktop\myh.csv","w",newline="",encoding="utf-8")
# write=csv.writer(file)
# a=[["角色","血量","战斗力","元神"],["悟空","100","150","21"],["z八戒","60","23","12"],["A","80","65","12"]]
# for row in a:
# write.writerow(row)
# file.close()
# with open (r"C:\Users\EDY\Desktop\myh.csv")as f:
# a=[]
# for line in f:
# row=line.strip("\n").split(",")
# a.append(row)
# print(a)
# import csv
# with open(r"C:\Users\EDY\Desktop\myh.csv") as f:
# r=csv.reader(f)
# print(list(r))
\ No newline at end of file
角色,血量,战斗力,元神
悟空,100,150,21
八戒,60,23,12
小A,80,65,12
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