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":
for number, participant in enumerate(match.find('participants').findall('participant')):
if participant.find('participant_name').text in ['Atletico Madrid'] and not number:
if participant.find('participant_name').text in ['Liverpool'] and number:
print match