import numpy as np a = np.array([0, 1, 2, 3]) np.savetxt("foo.txt", a) b = np.loadtxt("foo.txt") print(b)