I want the data from the txt file to be in an array My txt file contains names written one after the other on a new line:
Sophia
Emily
Mary
Linda
Madison
Susan
Lily
...
I want them in the table
name = [ 'Sophia', 'Emily', 'Mary', 'Linda', 'Madison', 'Susan', 'Lily', ...]
it -> ...
means that there is still n amount of data, eg it's thousands
i open my file with
with open('dane.txt') as x:
contents = x.read()
I'm not sure if it's correct but it's reading the data so far
i wanted to use
import numpy as np
name=np.loadtxt("dane.txt",dtype="str")
but i don't know why i get "Import "numpy" could not be resolved"