I have this program:
import sys
import itertools
from itertools import islice
fileLocation = input("Input the file location of ScoreBoard: ")
input1 = open(fileLocation, "rt")
amountOfLines = 0
for line in open('input1.txt').readlines( ):
amountOfLines += 1
timestamps = [line.split(' ', 1)[0][0:] for line in islice(input1, 2, amountOfLines)]
teamids = [line.split(' ', 1)[0][0:] for line in islice(input1, 2, amountOfLines)]
print(teamids)
and this text file:
1
5 6
1 5 1 5 0
1 4 1 4 1
2 1 2 1 1
2 2 3 1 1
3 5 2 1 1
4 4 5 4 1
For teamids, I want it to start reading after the first space and to the next space, starting from the second line which, I have already achieved but don't get how to start reading after the first space to the next. For timestamps i have managed this but only starting from the first character to the first space and don't know how to do this for teamids. Much help would be appreciated