we have the following code: I get the response (ValueError: Mixing iteration and read methods would lose data) Any help
def extract_data(filename):
def extract_data(filename):
infile=open(filename, "r")
#infile.readlines()
v0 = infile.next() #or []/{}/
t=[]
for line in infile.readlines():
t.append(line)
return v0, t
v0, t = extract_data("ball_file.txt")