Commit d9b8e754 by BellCodeEditor

save project

parent e799c64b
Showing with 20 additions and 6 deletions
1,2,3 1,2,3
4,5,6
7,8,9
1,2,3
4,5,6
7,8,9
1,2,3
4,5,6
7,8,9
import csv import csv
a=[1,2,3] a=[[1,2,3],
b=[4,5,6] [4,5,6],
[7,8,9]]
with open("666.csv","w",encoding="utf=8")as file: with open("666.csv","w",encoding="utf=8",newline="")as file:
f=csv.writer(file) f=csv.writer(file)
f.writerow(a) for i in range(len(a)):
f.writerow(b) f.writerows(a)
\ No newline at end of file
with open("666.csv","r",encoding="utf=8",newline="")as file:
f=csv.reader(file)
data=list(f)
print(data[0][0])
\ 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