Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python read file

l_a=[]
l_m=[]
l_w=[]
with open("spots.txt","r") as file:
    line=file.readlines()
    for i in range(0,len(line),1):
        [a,m,w]=line[i].split()
        l_a.append(float(a))
        l_m.append(float(m))
        l_w.append(float(w))
Source by www.pythontutorial.net #
 
PREVIOUS NEXT
Tagged: #python #read #file
ADD COMMENT
Topic
Name
3+2 =