I'm trying to write a code that read from an external file a set of values like this:
4.87320984E-09 1 49.882684417026184 0.18691906898647714 0.22222662961584136
1.88917193E-09 2 49.882684417026184 0.18691906898647714 0.22222662961584136
1.30942168E-09 3 49.882684417026184 0.18691906898647714 0.22222662961584136
7.26580629E-10 4 49.882684417026184 0.18691906898647714 0.22222662961584136
5.39025047E-10 5 49.882684417026184 0.18691906898647714 0.22222662961584136
2.04686401E-08 1 68.253977742324736 -5.0977927905402787E-002 0.32783928527485512
3.08666603E-09 3 68.253977742324736 -5.0977927905402787E-002 0.32783928527485512
2.88387625E-09 4 68.253977742324736 -5.0977927905402787E-002 0.32783928527485512
1.15430343E-09 5 68.253977742324736 -5.0977927905402787E-002 0.32783928527485512
I want to store every column in a list and do some maths with them.
import sys
inFile = sys.argv[1]
c1 = []
c2 = []
c3 = []
c4 = []
c5 = []
data = [c1,c2,c3,c4,c5]
with open(inFile,'r') as i:
lines = i.read().split('\n')
for row in lines:
#split in columns and do some maths
print data