given a line of strings
01 02 03 04 05
06 07 08 09 10
.. .. .. .. ..
I am trying to access the 1st element, "01":
def ElementA (inputFile):
element_A = ""
with open(inputFile, 'r') as inputFile:
for line in inputFile:
for i in line.split():
element_A = i[0:2]
print(element)
For some reason the output is "05". What am I doing wrong?