python - Reading data from non-CSV files -
i have data in text file looks this:
2,20 12,40 13,100 14,300 15,440 16,10 24,50 25,350 26,2322 27,3323 28,9999 29,2152 30,2622 31,50
i read data 2 different lists in python. however, not csv file. data read this: mass1,intensity1 mass2,intensity2 mass3,intensity3...
how should go reading masses , intensities 2 different lists? trying avoid writing file make data neater and/or in csv format.
it looks line.split()
each line isolate individual pairs, use pair.split(",")
separate mass , intensity in each pair.
Comments
Post a Comment