for match in xmldata findall events event if match findtext periods pe

1
2
3
4
5
6
for match in xmldata.findall("events/event"):
if match.findtext('periods/period/period_description') == "Game" and match.findtext('sporttype') == "Soccer":
participant1 = match.findall('participants/participant')[0]
participant2 = match.findall('participants/participant')[1]
if participant1.findtext('participant_name') in ['Atletico Madrid'] and participant2.findtext('participant_name') in ['Liverpool']:
print match