def read1(file): #this function will read and extract the first column of values from the
with open(file,"r") as b: # text allowing us to access it later in our main function
list1 = list(b)
lines = b.readlines()
result1 = []
for i in lines:
result1.append(list1.split()[0])
b.close
return result1
x = read1("XRD_example1.txt")
是否清楚可见任何错误?
您愿意: