The code for events was this and it successfully worked.But i tried to modify it to ectract others and it's not working, obviously it's not correct.
with open('GroupEvent/G0.txt') as f:
lines = f.readlines()
for i in range(0, len(lines)):
if lines[i] == '\n':
nlines = 0
else:
line = lines[i]
entry=line.split()
for x in entry:
first_char=x
EventToMatch = ('E')
if first_char.startswith(EventToMatch) and nlines == 1 :
Events.append(first_char)
nlines = 2
break
elif nlines==2:
Org.append(first_char)
nlines= 3
elif nlines == 3:
Yes.append(first_char)
nlines =4
elif nlines == 4:
No.append(first_char)
nlines == 0
else:
break
okay so I have a file in which I have data like above, now the first line the id with E is the specific id of an event and on the second link it's the person id's who is organizing, while the 3rd line has the id of the person who accepted the invite and the fourth one is the one who rejected. The file has dozens of record like this separated by one empty line. How can I collect the data for organizer id, people who said yes and no? I easily captured the event id that's because it started with E and I got myself an array of event ids. Now I am having trouble extracting the others.
