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

1
2
3
4
5
6
for match in xmldata.findall("evemts/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')[2]
if participant1.findtext('participant_name') in ['Atletico Madrid'] and participant1.findtext('participant_name') in ['Liverpool']:
print match