for match in xmldata find events findall event if match find periods f

1
2
3
4
5
6
for match in xmldata.find('events').findall("event"):
if match.find('periods').find('period').find('period_description').text == "Game" and match.find('sporttype').text == "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