sábado, 11 de abril de 2020

How to read text file into a list or array with Python? with f.reaf or loadtxt from numpy


How to read text file into a list or array with Python?

from link
https://www.tutorialspoint.com/How-to-read-text-file-into-a-list-or-array-with-Python
f = open('my_file.txt', 'r+')
my_file_data = f.read()
f.close()


con numpy from my expirence

xr=np.loadtxt("my_file.txt")



No hay comentarios:

Publicar un comentario