data.csv
1,2,3,4,5,6,7,8,9,10
[numpy]
import numpy as np
data = np.loadtxt('data.csv', delimiter=',', dtype=np.int32)
print(data)
for i, v in enumerate(data):
print(i, v)
[pickle]
import pickle
color = [1,2,3,4]
pickle.dump(color, open('colors.txt', 'wb'))
color = pickle.load(open('colors.txt', 'rb'))
print(color)
댓글 없음:
댓글 쓰기